From 95d7e4c55d6196c76a2d023408d138b213598dc7 Mon Sep 17 00:00:00 2001 From: Bjarne Magnussen Date: Sat, 20 Oct 2018 12:13:18 +0200 Subject: [PATCH] Small bugfix when initializing Creator role I think think this fixes a small bug in the serialization of a new PSBT when the Creator role is initalized. --- psbt.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/psbt.py b/psbt.py index 8a4d62b..4cc9fd1 100644 --- a/psbt.py +++ b/psbt.py @@ -383,7 +383,7 @@ def __init__(self, inputs, outputs, tx_version=2, input_sequence=0xffffffff, loc # Construct a serialized psbt manually new_psbt_serialized = MAGIC_BYTES + HEAD_SEPARATOR + psbt.serialize_map(key=PSBT_GLOBAL_UNSIGNED_TX, \ value=serialized_tx) + DATA_SEPARATOR + (DATA_SEPARATOR*len(self.tx_inputs)) + \ - (DATA_SEPARATOR*len(self.tx_inputs)) + (DATA_SEPARATOR*len(self.tx_outputs)) # Create the psbt object using the serialized psbt self.psbt = psbt.parse(BytesIO(new_psbt_serialized))