From bb87b1f996c0ea96362ad515aacf937430e206c8 Mon Sep 17 00:00:00 2001 From: The MMGen Project Date: Fri, 29 Nov 2019 18:41:36 +0000 Subject: [PATCH] [BCH]: workaround for Bitcoin ABC's broken 'setlabel' RPC --- mmgen/tw.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mmgen/tw.py b/mmgen/tw.py index 4486a16e..d463536d 100755 --- a/mmgen/tw.py +++ b/mmgen/tw.py @@ -731,7 +731,9 @@ class TrackingWallet(MMGenObject): @write_mode def set_label(self,coinaddr,lbl): - if 'label_api' in g.rpch.caps: + # bitcoin-abc 'setlabel' RPC is broken, so use old 'importaddress' method to set label + # broken behavior: new label is set OK, but old label gets attached to another address + if 'label_api' in g.rpch.caps and g.coin != 'BCH': return g.rpch.setlabel(coinaddr,lbl,on_fail='return') else: # NOTE: this works because importaddress() removes the old account before