From 15ab8d9e2183f8f622e049eac95bd2ca0b6c347b Mon Sep 17 00:00:00 2001 From: philemon Date: Mon, 4 Jul 2016 21:49:21 +0300 Subject: [PATCH] modified: mmgen/main_txcreate.py (merge conflict) --- mmgen/main_txcreate.py | 45 ------------------------------------------ 1 file changed, 45 deletions(-) diff --git a/mmgen/main_txcreate.py b/mmgen/main_txcreate.py index 9dfd26dc..a2eec9f2 100755 --- a/mmgen/main_txcreate.py +++ b/mmgen/main_txcreate.py @@ -341,51 +341,6 @@ Accept the global default fee of {f} BTC? # main(): execution begins here -def get_fee_estimate(): - if 'tx_fee' in opt.set_by_user: - return None - else: - ret = c.estimatefee(opt.tx_confs) - if ret != -1: - return ret - else: - m = """ -Fee estimation failed! -Your possible courses of action (from best to worst): - 1) Re-run script with a different '--tx-confs' parameter (now '{c}') - 2) Re-run script with the '--tx-fee' option (specify fee manually) - 3) Accept the global default fee of {f} BTC -Accept the global default fee of {f} BTC? -""".format(c=opt.tx_confs,f=opt.tx_fee).strip() - if keypress_confirm(m): - return None - else: - die(1,'Exiting at user request') - -# see: https://bitcoin.stackexchange.com/questions/1195/how-to-calculate-transaction-size-before-sending -def get_tx_size_and_fee(inputs,outputs): - tx_size = len(inputs)*180 + len(outputs)*34 + 10 - if fee_estimate: - ftype,fee = 'Calculated','{:.8f}'.format(fee_estimate*opt.tx_fee_adj*tx_size / 1024) - else: - ftype,fee = 'User-selected',opt.tx_fee - if not keypress_confirm('{} TX fee: {} BTC. OK?'.format(ftype,fee),default_yes=True): - while True: - ufee = my_raw_input('Enter transaction fee: ') - if normalize_btc_amt(ufee): - if Decimal(ufee) > g.max_tx_fee: - msg('{} BTC: fee too large (maximum fee: {} BTC)'.format(ufee,g.max_tx_fee)) - else: - fee = ufee - break - vmsg('Inputs:{} Outputs:{} TX size:{}'.format(len(sel_unspent),len(tx_out),tx_size)) - vmsg('Fee estimate: {} (1024 bytes, {} confs)'.format(fee_estimate,opt.tx_confs)) - m = ('',' (after %sx adjustment)' % opt.tx_fee_adj)[opt.tx_fee_adj != 1] - vmsg('TX fee: {}{}'.format(fee,m)) - return tx_size,normalize_btc_amt(fee) - -# main(): execution begins here - cmd_args = opts.init(opts_data) tx = MMGenTX()