Changeset View
Changeset View
Standalone View
Standalone View
test/functional/bip68-112-113-p2p.py
Show First 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | def create_transaction(self, node, txid, to_address, amount): | ||||
rawtx = node.createrawtransaction(inputs, outputs) | rawtx = node.createrawtransaction(inputs, outputs) | ||||
tx = CTransaction() | tx = CTransaction() | ||||
f = BytesIO(hex_str_to_bytes(rawtx)) | f = BytesIO(hex_str_to_bytes(rawtx)) | ||||
tx.deserialize(f) | tx.deserialize(f) | ||||
return tx | return tx | ||||
def sign_transaction(self, node, unsignedtx): | def sign_transaction(self, node, unsignedtx): | ||||
rawtx = ToHex(unsignedtx) | rawtx = ToHex(unsignedtx) | ||||
signresult = node.signrawtransaction(rawtx) | signresult = node.signrawtransactionwithwallet(rawtx) | ||||
tx = CTransaction() | tx = CTransaction() | ||||
f = BytesIO(hex_str_to_bytes(signresult['hex'])) | f = BytesIO(hex_str_to_bytes(signresult['hex'])) | ||||
tx.deserialize(f) | tx.deserialize(f) | ||||
return tx | return tx | ||||
def generate_blocks(self, number): | def generate_blocks(self, number): | ||||
test_blocks = [] | test_blocks = [] | ||||
for i in range(number): | for i in range(number): | ||||
▲ Show 20 Lines • Show All 465 Lines • Show Last 20 Lines |