예제 #1
0
파일: term.py 프로젝트: totaltrader/mmgen
def tt_txview():
    cmsg('Testing tx.view_with_prompt() (try each viewing option)')
    from mmgen.tx import MMGenTX
    fn = 'test/ref/0B8D5A[15.31789,14,tl=1320969600].rawtx'
    tx = MMGenTX.Unsigned(filename=fn, quiet_open=True)
    while True:
        tx.view_with_prompt('View data for transaction?', pause=False)
        if not keypress_confirm('Continue testing transaction view?',
                                default_yes=True):
            break
예제 #2
0
 async def test_mmgen_txs():
     fns = (
         ('btc', False,
          'test/ref/0B8D5A[15.31789,14,tl=1320969600].rawtx'),
         ('btc', True,
          'test/ref/0C7115[15.86255,14,tl=1320969600].testnet.rawtx'),
         #	('bch',False,'test/ref/460D4D-BCH[10.19764,tl=1320969600].rawtx')
     )
     print_info('test/ref/*rawtx', 'MMGen reference')
     for n, (coin, testnet, fn) in enumerate(fns):
         tx = MMGenTX.Unsigned(filename=fn)
         await test_tx(tx_proto=tx.proto,
                       tx_hex=tx.hex,
                       desc=fn,
                       n=n + 1)
     Msg('OK')