File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1789,12 +1789,16 @@ impl Compiler {
17891789 } ) ;
17901790 }
17911791 Operation :: AddPrefillTx => {
1792- let block = self
1793- . get_input :: < bitcoin:: Block > ( & instruction. inputs , 1 ) ?
1794- . clone ( ) ;
1795- let tx_to_prefill = self . get_input :: < Tx > ( & instruction. inputs , 2 ) ?;
1796- let tx_to_prefill_id = tx_to_prefill. id ;
1792+ let prefill_len = self
1793+ . get_input :: < PrefillTransactions > ( & instruction. inputs , 0 ) ?
1794+ . indices
1795+ . len ( ) ;
1796+ let block = self . get_input :: < bitcoin:: Block > ( & instruction. inputs , 1 ) ?;
1797+ if prefill_len >= block. txdata . len ( ) . saturating_sub ( 1 ) {
1798+ return Ok ( ( ) ) ;
1799+ }
17971800
1801+ let tx_to_prefill_id = self . get_input :: < Tx > ( & instruction. inputs , 2 ) ?. id ;
17981802 // Find the position of this tx within the block's non-coinbase transactions.
17991803 // If the tx is not part of this block, skip it silently.
18001804 let Some ( position) = block. txdata [ 1 ..]
You can’t perform that action at this time.
0 commit comments