Author

Topic: Negative Balance in RPC Accounts (Read 234 times)

legendary
Activity: 3332
Merit: 3116
October 25, 2018, 11:01:41 AM
#4
You should try with :

Code:
bitcoin-cli getreceivedbyaddress 1BitcoinAddyFull...

And you can make a script with the list of addys to get the real balance from each one.
Code:
for a in $(cat addys.txt)
do
echo "$a-"$(bitcoin-cli getreceivedbyaddress $a)
done
staff
Activity: 3458
Merit: 6793
Just writing some code
October 24, 2018, 08:35:08 AM
#3
This is expected behavior with accounts. This is also one reason why you shouldn't use it.
legendary
Activity: 1624
Merit: 2481
October 24, 2018, 02:02:44 AM
#2
Using 'Accounts' inside of core is deprecated. Check https://bitcoin.org/en/developer-reference#rpc-quick-reference.

If you need to handle different type of user, you'll need to create an external database and link them to addresses generated by core.
The 'account functionality' inside of core does not work properly and is deprecated.

Do not use and/or rely on it.
newbie
Activity: 18
Merit: 0
October 24, 2018, 01:52:37 AM
#1
 Hi There,

I am using bitcoin core with RPC and have linked few accounts to it. When I run "listaccounts" command via bitcoin-cli, it gives following output:

{
  "": 0.00000000,
  "5ab4aafee94ff2258d2237a5": 0.01493139,
  "LABELPREFIX5ae21dd9bb5c583ec41732ae": 0.00000000,
  "LABELPREFIX5ae21de2bb5c583ec41732af": 0.00000000,
"LABELPREFIX5ae457e0bb5c583ec41732cd": -0.00588460,
  "LABELPREFIX5ae45999bb5c583ec41732d1": -0.00107414,

  "LABELPREFIX5ae6b2fcbb5c583ec41732e3": 0.00000000,
 "LABELPREFIX5ae86a453c74bc56539edbcd": -0.00144921,
  "LABELPREFIX5ae95e845e4db63ceb8b72e0": 0.00000000,
  "LABELPREFIX5aefffce0f96522e2658640a": 0.00000000,
  "LABELPREFIX5af000590f96522e2658640b": 0.00000000,
  "LABELPREFIX5af004350f96522e2658641b": 0.00000000,
  "LABELPREFIX5af004a70f96522e2658641f": 0.00000000,
  "LABELPREFIX5af0054e0f96522e26586422": 0.00000000,
  "LABELPREFIX5af008f00f96522e26586429": 0.00000000,
  "LABELPREFIX5af012010f96522e2658642e": 0.00000000,
  "LABELPREFIX5af013df0f96522e2658642f": 0.00000000,
  "LABELPREFIX5af025f60f96522e2658643c": 0.00000000,
  "LABELPREFIX5af0267d0f96522e2658643f": 0.00000000,
  "LABELPREFIX5af0295e0f96522e26586443": 0.00000000,
  "LABELPREFIX5af02a220f96522e26586447": 0.00000000,
  "LABELPREFIX5afd9be466270076e8aab970": 0.00000000,
  "LABELPREFIX5b05806e66270076e8aab9e8": 0.00000000,
  "LABELPREFIX5b05a9d666270076e8aaba18": 0.00000000,
  "LABELPREFIX5b0a43830153e23d9ee80064": 0.00000000,
  "LABELPREFIX5b0bcdd109b9224736c9b36f": 0.00000000,
 "LABELPREFIX5b17865709b9224736c9b3e5": -0.00652344,
  "LABELPREFIX5b1f714509b9224736c9b426": 0.00000000,
  "LABELPREFIX5b58638830db55306b567116": 0.00000000,
  "test": 0.00000000
}

I can't understand why these four accounts have negative balance. And when I add all these negative balances, outcome is this  "5ab4aafee94ff2258d2237a5": 0.01493139, balance.

Help in all ways is highly appreciated. God Bless You
Jump to: