From def5a16ad4b0463cf20282543fac3327b06033c6 Mon Sep 17 00:00:00 2001 From: Michael Hampton Date: Tue, 30 Jul 2019 17:33:30 -0400 Subject: [PATCH] bitcoind 0.17/0.18 getbalance compatibility change Because of bitcoind deprecating its internal account system, the getbalance RPC call now has a dummy argument as the first argument. The help says it can be omitted or changed to '*', so we change it to '*', both for backward compatibility and because in testing I found that omitting the argument was broken. Using '*' has the same semantics as omitting the argument, if accounts were not used in the previous version of bitcoind. --- lib/plugins/wallet/bitcoind/bitcoind.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/plugins/wallet/bitcoind/bitcoind.js b/lib/plugins/wallet/bitcoind/bitcoind.js index bf07680f..68ed5a8d 100644 --- a/lib/plugins/wallet/bitcoind/bitcoind.js +++ b/lib/plugins/wallet/bitcoind/bitcoind.js @@ -27,7 +27,7 @@ function checkCryptoCode (cryptoCode) { function accountBalance (account, cryptoCode, confirmations) { return checkCryptoCode(cryptoCode) - .then(() => fetch('getbalance', ['', confirmations])) + .then(() => fetch('getbalance', ['*', confirmations])) .then(r => BN(r).shift(unitScale).round()) }