update to 0.17.0 broke several rpc api calls that worked under 0.16.3, how to migrate correcty my code?

0

After updating from Bitcoin core 0.16.3 to 0.17 I've found several RPC calls are now broken, and I'm not sure on how to migrate/update my code (PHP).

Things broken so far:

  • getbalance : does not detect unconfirmed balance, this command shows only confirmed balance where it used to (and should) show confirmed+unconfirmed balance. Expected to work like in 0.16.3.

    $btc->getbalance("*", 0);
    
  • listunspent: does not detect unconfirmed inputs, showing nothing and returning error stating "Invalid amount". Expected to work like in 0.16.3.

    $btc->listunspent(0, 9999999, array(), true, array("minimumAmount" => 0.00005));
    

I will add more to the list as they get discovered. There is no mention of these issues online, in the 0.17 changelog or anywhere else I could find.

Already updated some other php code that used validateaddress deprecated call and a couple more, probably still missing some editing here.

How to restore functionality as expected? Thanks.

3codyz0

Posted 2018-11-11T21:37:35.950

Reputation: 1

Answers

1

The first issue, with getbalance, is a known issue which will be fixed in the next release. You can see the pull request for it here: https://github.com/bitcoin/bitcoin/pull/14602

The latter, though, I cannot seem to replicate. To my knowledge, listunspent has not been modified in version 0.17, and it seems to work as expected when I test on the command line. Did it work before? Perhaps PHP is causing the issue, could you try enclosing the number as a string instead just to test it? "minimumAmount" => "0.00005"

MeshCollider

Posted 2018-11-11T21:37:35.950

Reputation: 8 735

2Perhaps mention that it can be worked around using getunconfirmedbalance.Pieter Wuille 2018-11-12T01:54:40.797