diff options
author | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-07-19 15:00:20 +0200 |
---|---|---|
committer | Sebastian Falbesoner <sebastian.falbesoner@gmail.com> | 2022-07-23 08:48:08 +0200 |
commit | 2a428c79897761579efc990aaf810b0eb3e572b6 (patch) | |
tree | ae1c79565148a0a84130ee8c69b7f00f1ffc80dd /test/functional/test_framework | |
parent | b8067cd435059eedb580975afc62c4e7a6f27321 (diff) |
test: support passing PSBTMaps directly to PSBT ctor
This will allow to create simple PSBTs as short one-liners, without the
need to have three individual assignments (globals, inputs, outputs).
Diffstat (limited to 'test/functional/test_framework')
-rw-r--r-- | test/functional/test_framework/psbt.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/test_framework/psbt.py b/test/functional/test_framework/psbt.py index ad3fe29b62..68945e7e84 100644 --- a/test/functional/test_framework/psbt.py +++ b/test/functional/test_framework/psbt.py @@ -96,10 +96,10 @@ class PSBTMap: class PSBT: """Class for serializing and deserializing PSBTs""" - def __init__(self): - self.g = PSBTMap() - self.i = [] - self.o = [] + def __init__(self, *, g=None, i=None, o=None): + self.g = g if g is not None else PSBTMap() + self.i = i if i is not None else [] + self.o = o if o is not None else [] self.tx = None def deserialize(self, f): |