diff options
author | Samuel Dobson <dobsonsa68@gmail.com> | 2021-09-29 17:41:35 +1300 |
---|---|---|
committer | Samuel Dobson <dobsonsa68@gmail.com> | 2021-09-29 17:41:35 +1300 |
commit | b207971465f5c0dd2b1b663dcb8b74e0ac59b301 (patch) | |
tree | 94fa4ce7cd239ae337be75ee1aef861d0b626d7f | |
parent | 3c776fdcec176ffaa2056633fa2b4e737cda29ce (diff) | |
download | bitcoin-b207971465f5c0dd2b1b663dcb8b74e0ac59b301.tar.xz |
Fix feature_segwit failure due to witness
-rwxr-xr-x | test/functional/feature_segwit.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/functional/feature_segwit.py b/test/functional/feature_segwit.py index 4054a9a903..25d1cb2bf1 100755 --- a/test/functional/feature_segwit.py +++ b/test/functional/feature_segwit.py @@ -236,12 +236,14 @@ class SegWitTest(BitcoinTestFramework): self.log.info("Verify sigops are counted in GBT with BIP141 rules after the fork") txid = self.nodes[0].sendtoaddress(self.nodes[0].getnewaddress(), 1) + raw_tx = self.nodes[0].getrawtransaction(txid, True) tmpl = self.nodes[0].getblocktemplate({'rules': ['segwit']}) assert_greater_than_or_equal(tmpl['sizelimit'], 3999577) # actual maximum size is lower due to minimum mandatory non-witness data assert_equal(tmpl['weightlimit'], 4000000) assert_equal(tmpl['sigoplimit'], 80000) assert_equal(tmpl['transactions'][0]['txid'], txid) - assert_equal(tmpl['transactions'][0]['sigops'], 8) + expected_sigops = 9 if 'txinwitness' in raw_tx["vin"][0] else 8 + assert_equal(tmpl['transactions'][0]['sigops'], expected_sigops) assert '!segwit' in tmpl['rules'] self.generate(self.nodes[0], 1) # Mine a block to clear the gbt cache |