From 379a041e8d802c2615ba2d15d4e5545657929d96 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Wed, 9 Sep 2026 18:33:59 +0000 Subject: [PATCH] tx.completed: new `DummyCompleted` class --- mmgen/tx/completed.py | 7 +++++++ mmgen/tx/file.py | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/mmgen/tx/completed.py b/mmgen/tx/completed.py index 12fc5e34..5fe6f494 100755 --- a/mmgen/tx/completed.py +++ b/mmgen/tx/completed.py @@ -103,3 +103,10 @@ class Completed(Base): if self.is_swap: raise ValueError('missing or invalid memo in swap transaction') + +class DummyCompleted: # required by MMGenTxFile.get_proto() + + desc = 'dummy transaction' + + def __init__(self, cfg): + self.cfg = cfg diff --git a/mmgen/tx/file.py b/mmgen/tx/file.py index e389aa08..0ceec6b1 100755 --- a/mmgen/tx/file.py +++ b/mmgen/tx/file.py @@ -336,7 +336,7 @@ class MMGenTxFile(MMGenObject): @classmethod def get_proto(cls, cfg, filename, *, quiet_open=False): - from . import BaseTX - tmp_tx = BaseTX(cfg=cfg) + from .completed import DummyCompleted + tmp_tx = DummyCompleted(cfg=cfg) cls(tmp_tx).parse(filename, get_proto_only=True, quiet_open=quiet_open) return tmp_tx.proto