Changeset View
Changeset View
Standalone View
Standalone View
test/functional/feature_bip68_sequence.py
Show First 20 Lines • Show All 480 Lines • ▼ Show 20 Lines | def test_version2_relay(self, before_activation): | ||||
rawtx = self.nodes[1].createrawtransaction(inputs, outputs) | rawtx = self.nodes[1].createrawtransaction(inputs, outputs) | ||||
rawtxfund = self.nodes[1].fundrawtransaction(rawtx)['hex'] | rawtxfund = self.nodes[1].fundrawtransaction(rawtx)['hex'] | ||||
tx = FromHex(CTransaction(), rawtxfund) | tx = FromHex(CTransaction(), rawtxfund) | ||||
tx.nVersion = 2 | tx.nVersion = 2 | ||||
tx_signed = self.nodes[1].signrawtransactionwithwallet(ToHex(tx))[ | tx_signed = self.nodes[1].signrawtransactionwithwallet(ToHex(tx))[ | ||||
"hex"] | "hex"] | ||||
try: | try: | ||||
self.nodes[1].sendrawtransaction(tx_signed) | self.nodes[1].sendrawtransaction(tx_signed) | ||||
assert before_activation == False | assert not before_activation | ||||
except: | except: | ||||
assert before_activation | assert before_activation | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
BIP68Test().main() | BIP68Test().main() |