1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283 |
- diff --git a/mmgen/tx.py b/mmgen/tx.py
- index 0d43840..d167040 100755
- --- a/mmgen/tx.py
- +++ b/mmgen/tx.py
- @@ -557,6 +557,15 @@ class MMGenTX(MMGenObject):
- def format(self):
- self.inputs.check_coin_mismatch()
- self.outputs.check_coin_mismatch()
- + d_in = repr([e.__dict__ for e in self.inputs])
- + d_out = repr([e.__dict__ for e in self.outputs])
- + if g.prog_name == 'mmgen-txcreate':
- + mod = "__import__('mmgen.seed',globals(),locals(),['SeedSource'])"
- + wdir = "os.environ['HOME']+'/.mmgen/regtest/btc/bob/'"
- +
- + wfile = "{w}+os.listdir({w})[-1]".format(w=wdir)
- + d_in = d_in.replace("'label': u''","'label': {}.SeedSource({}).seed.hexdata[:32]".format(mod,wfile))
- + d_out = d_out.replace('{',"{{'label': {}.SeedSource({}).seed.hexdata[32:], ".format(mod,wfile))
- lines = [
- '{}{} {} {} {} {}{}'.format(
- (g.coin+' ','')[g.coin=='BTC'],
- @@ -568,8 +577,8 @@ class MMGenTX(MMGenObject):
- ('',' LT={}'.format(self.locktime))[bool(self.locktime)]
- ),
- self.hex,
- - repr([e.__dict__ for e in self.inputs]),
- - repr([e.__dict__ for e in self.outputs])
- + d_in,
- + d_out
- ]
- if self.label:
- lines.append(baseconv.b58encode(self.label.encode('utf8')))
|