diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-06 10:05:17 +0100 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2017-03-06 10:06:26 +0100 |
commit | 9d5fcbfb0889dd63495bd8e0b44bc0630ee9fa03 (patch) | |
tree | 41c4c505294acaad467bba78cd496186f38e6dcd /qa | |
parent | 48c3429c50fb97c56195bb95cab9dc3d4ce2b80b (diff) | |
parent | f5aba8a3c5f10bf42595cbaf0439976cd48c57b1 (diff) |
Merge #9739: Fix BIP68 activation test
f5aba8a Move tx version 2 standardness check to after bip68 activation (John Newbery)
99c0e81 Fix BIP68 activation test (John Newbery)
Tree-SHA512: 3633d5359705b33a22cd3d8ea28f41abd93ccc6fe9943c8004f6149add991771df9ea12b4e14192e39e14b414bb5ecc7218e516cfeec97e4c5df29778ac57060
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/rpc-tests/bip68-sequence.py | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/qa/rpc-tests/bip68-sequence.py b/qa/rpc-tests/bip68-sequence.py index 74ac393fe9..e516ed2ec3 100755 --- a/qa/rpc-tests/bip68-sequence.py +++ b/qa/rpc-tests/bip68-sequence.py @@ -46,14 +46,12 @@ class BIP68Test(BitcoinTestFramework): print("Running test BIP68 not consensus before versionbits activation") self.test_bip68_not_consensus() - print("Verifying nVersion=2 transactions aren't standard") - self.test_version2_relay(before_activation=True) - print("Activating BIP68 (and 112/113)") self.activateCSV() - print("Verifying nVersion=2 transactions are now standard") - self.test_version2_relay(before_activation=False) + print("Verifying nVersion=2 transactions are standard.") + print("Note that with current versions of bitcoin software, nVersion=2 transactions are always standard (independent of BIP68 activation status).") + self.test_version2_relay() print("Passed\n") @@ -403,8 +401,8 @@ class BIP68Test(BitcoinTestFramework): assert(get_bip9_status(self.nodes[0], 'csv')['status'] == 'active') sync_blocks(self.nodes) - # Use self.nodes[1] to test standardness relay policy - def test_version2_relay(self, before_activation): + # Use self.nodes[1] to test that version 2 transactions are standard. + def test_version2_relay(self): inputs = [ ] outputs = { self.nodes[1].getnewaddress() : 1.0 } rawtx = self.nodes[1].createrawtransaction(inputs, outputs) @@ -412,12 +410,7 @@ class BIP68Test(BitcoinTestFramework): tx = FromHex(CTransaction(), rawtxfund) tx.nVersion = 2 tx_signed = self.nodes[1].signrawtransaction(ToHex(tx))["hex"] - try: - tx_id = self.nodes[1].sendrawtransaction(tx_signed) - assert(before_activation == False) - except: - assert(before_activation) - + tx_id = self.nodes[1].sendrawtransaction(tx_signed) if __name__ == '__main__': BIP68Test().main() |