File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -236,12 +236,14 @@ def run_test(self):
236
236
237
237
self .log .info ("Verify sigops are counted in GBT with BIP141 rules after the fork" )
238
238
txid = self .nodes [0 ].sendtoaddress (self .nodes [0 ].getnewaddress (), 1 )
239
+ raw_tx = self .nodes [0 ].getrawtransaction (txid , True )
239
240
tmpl = self .nodes [0 ].getblocktemplate ({'rules' : ['segwit' ]})
240
241
assert_greater_than_or_equal (tmpl ['sizelimit' ], 3999577 ) # actual maximum size is lower due to minimum mandatory non-witness data
241
242
assert_equal (tmpl ['weightlimit' ], 4000000 )
242
243
assert_equal (tmpl ['sigoplimit' ], 80000 )
243
244
assert_equal (tmpl ['transactions' ][0 ]['txid' ], txid )
244
- assert_equal (tmpl ['transactions' ][0 ]['sigops' ], 8 )
245
+ expected_sigops = 9 if 'txinwitness' in raw_tx ["vin" ][0 ] else 8
246
+ assert_equal (tmpl ['transactions' ][0 ]['sigops' ], expected_sigops )
245
247
assert '!segwit' in tmpl ['rules' ]
246
248
247
249
self .generate (self .nodes [0 ], 1 ) # Mine a block to clear the gbt cache
You can’t perform that action at this time.
0 commit comments