Changeset View
Changeset View
Standalone View
Standalone View
test/functional/bip68-sequence.py
Show First 20 Lines • Show All 455 Lines • ▼ Show 20 Lines | def test_version2_relay(self, before_activation): | ||||
inputs = [] | inputs = [] | ||||
outputs = {self.nodes[1].getnewaddress(): 1.0} | outputs = {self.nodes[1].getnewaddress(): 1.0} | ||||
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].signrawtransaction(ToHex(tx))["hex"] | tx_signed = self.nodes[1].signrawtransaction(ToHex(tx))["hex"] | ||||
try: | try: | ||||
tx_id = self.nodes[1].sendrawtransaction(tx_signed) | self.nodes[1].sendrawtransaction(tx_signed) | ||||
assert(before_activation == False) | assert(before_activation == False) | ||||
except: | except: | ||||
assert(before_activation) | assert(before_activation) | ||||
if __name__ == '__main__': | if __name__ == '__main__': | ||||
BIP68Test().main() | BIP68Test().main() |