Bitcoin Core v0.19.0 compatibility fix

This commit is contained in:
The MMGen Project 2019-10-10 19:54:41 +00:00
commit e5ed814239
Signed by: mmgen
GPG key ID: 3F8B1861E32B7DA2

View file

@ -451,7 +451,7 @@ Selected non-{pnm} inputs: {{}}""".strip().format(pnm=g.proj_name,pnl=g.proj_nam
est_vsize = self.estimate_size()
d = g.rpch.decoderawtransaction(self.hex)
vsize = d['vsize'] if 'vsize' in d else d['size']
vmsg('\nSize: {}, Vsize: {} (true) {} (estimated)'.format(d['size'],vsize,est_vsize))
vmsg('\nVsize: {} (true) {} (estimated)'.format(vsize,est_vsize))
m1 = 'Estimated transaction vsize is {:1.2f} times the true vsize\n'
m2 = 'Your transaction fee estimates will be inaccurate\n'
m3 = 'Please re-create and re-sign the transaction using the option --vsize-adj={:1.2f}'
@ -897,7 +897,7 @@ Selected non-{pnm} inputs: {{}}""".strip().format(pnm=g.proj_name,pnl=g.proj_nam
return 'txid' in g.rpch.getrawtransaction(self.coin_txid,True,on_fail='silent')
def is_in_mempool():
return 'size' in g.rpch.getmempoolentry(self.coin_txid,on_fail='silent')
return 'height' in g.rpch.getmempoolentry(self.coin_txid,on_fail='silent')
def is_replaced():
if is_in_mempool(): return False
@ -939,7 +939,7 @@ Selected non-{pnm} inputs: {{}}""".strip().format(pnm=g.proj_name,pnl=g.proj_nam
msg('Replacing transactions:')
d = ((t,g.rpch.getmempoolentry(t,on_fail='silent')) for t in r.replacing_txs)
for txid,mp_entry in d:
msg(' {}{}'.format(txid,' in mempool' if ('size' in mp_entry) else ''))
msg(' {}{}'.format(txid,' in mempool' if ('height' in mp_entry) else ''))
die(0,'')
def confirm_send(self):