aboutsummaryrefslogtreecommitdiff
path: root/test/functional/test_framework/psbt.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/test_framework/psbt.py')
-rw-r--r--test/functional/test_framework/psbt.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/test_framework/psbt.py b/test/functional/test_framework/psbt.py
index 68945e7e84..3a5b4ec74d 100644
--- a/test/functional/test_framework/psbt.py
+++ b/test/functional/test_framework/psbt.py
@@ -123,6 +123,15 @@ class PSBT:
psbt = [x.serialize() for x in [self.g] + self.i + self.o]
return b"psbt\xff" + b"".join(psbt)
+ def make_blank(self):
+ """
+ Remove all fields except for PSBT_GLOBAL_UNSIGNED_TX
+ """
+ for m in self.i + self.o:
+ m.map.clear()
+
+ self.g = PSBTMap(map={0: self.g.map[0]})
+
def to_base64(self):
return base64.b64encode(self.serialize()).decode("utf8")