Bitcoin Forum
May 11, 2024, 04:53:37 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Some questions regarding the JSON RPC API  (Read 681 times)
xabbix (OP)
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile
November 23, 2013, 07:04:31 PM
 #1

This is my bitcoin balance:

Code:
[root@server ~]# bitcoind getbalance
0.08360000

Here is a list of all accounts:
Code:
[root@server ~]# bitcoind listaccounts
{
    "" : -0.01640000,
    "Test" : 0.10000000
}

How is it possible that I a negative value on the default account?

Here is the list of addresses assigned to both default and Test account:

Code:
[root@server ~]# bitcoind getaddressesbyaccount Test
[
    "1GHt68zezGUWxYE3mt3YdBAuJ4Gg1XobEn",
    "1E3tD67MK4b7vAV4TUt7sS773Cyhzojoty"
]
[root@server ~]# bitcoind getaddressesbyaccount ''
[
    "1CepZwcr8enPR2MeXViu6jJmw1b5Duy7cr",
    "19Y9Zr5kFW8eFzq2wpbZwXEtdGX7TpkTpM",
    "1Nx3MF99VS84tzqGfekVuQEYxYRWm9NxSZ"
]

As you saw before I have some balance but checking these five addresses none of them has any balance according to blockchain.info

Now it get's weirder, let's list all addresses:

Code:
[root@server ~]# bitcoind listaddressgroupings
[
    [
        [
            "1D8VXBrwLdkM7q97V9DrhCz6i9qSG7dH8X",
            0.00000000
        ],
        [
            "1Da5QLYwBUamhPhLHvVUfS8qyHmkWDLowV",
            0.00000000
        ],
        [
            "1GHt68zezGUWxYE3mt3YdBAuJ4Gg1XobEn",
            0.00000000,
            "Test"
        ],
        [
            "1GYfFugAg2JqmbNBUPU6mKjG5rBg2hG9Rn",
            0.00000000
        ],
        [
            "1JSmKBxUWTJpAitTJ6zHZ3u1YvnS9wmen2",
            0.00000000
        ],
        [
            "12QWneBpiY7QcfYsKya82qvoJ54zxDJBLn",
            0.00000000
        ],
        [
            "12eH7sqhMrkfPafpL2ReewrtgehmxvJ894",
            0.00000000
        ],
        [
            "17fuA8bpyDZy2s9duVmB89EUigZbfSa1n9",
            0.00000000
        ],
        [
            "1HzRmT7GyJWFTqiGz48KhKvFZGnB4dFKCH",
            0.00000000
        ],
        [
            "1DByVqUx95R3qiriq3vQfT1b8dmn8eomT2",
            0.00000000
        ],
        [
            "1EZLyKZd79qtpPk7g5GW6ZLRSeKCuNkSSJ",
            0.00000000
        ],
        [
            "1FSrVyFDZTJGBb4EdF2YTspsfEDySGCLrc",
            0.00000000
        ],
        [
            "1Q7yQ1XpZcxaAF3myohHJraxzD5DuANjmz",
            0.00000000
        ],
        [
            "12kpNxrWr15aRvqWEpBtYJZUKEqvrqFQvg",
            0.08360000
        ],
        [
            "1DyNaapimQowSpMJYucaw4DFrNyKGEXRJo",
            0.00000000
        ]
    ]
]

How come I get so many addresses? When I listed all available accounts and their addresses there were 5 listed.
And also, none of the above addresses has any balance in them..
"If you don't want people to know you're a scumbag then don't be a scumbag." -- margaritahuyan
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1715446417
Hero Member
*
Offline Offline

Posts: 1715446417

View Profile Personal Message (Offline)

Ignore
1715446417
Reply with quote  #2

1715446417
Report to moderator
1715446417
Hero Member
*
Offline Offline

Posts: 1715446417

View Profile Personal Message (Offline)

Ignore
1715446417
Reply with quote  #2

1715446417
Report to moderator
1715446417
Hero Member
*
Offline Offline

Posts: 1715446417

View Profile Personal Message (Offline)

Ignore
1715446417
Reply with quote  #2

1715446417
Report to moderator
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
November 24, 2013, 12:43:15 PM
 #2

How is it possible that I a negative value on the default account?

Accounts don't work like you think they should.  Lots of threads on this.

How come I get so many addresses?

Change.

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
xabbix (OP)
Newbie
*
Offline Offline

Activity: 49
Merit: 0


View Profile
November 24, 2013, 03:06:51 PM
 #3

Is there a JSON RPC command I can run to show me either all addresses or only addresses with positive balance in them?

Thanks
kjj
Legendary
*
Offline Offline

Activity: 1302
Merit: 1025



View Profile
November 25, 2013, 04:03:17 AM
 #4

You could run listunspent and work backwards from the scriptPubKey.

But why?

17Np17BSrpnHCZ2pgtiMNnhjnsWJ2TMqq8
I routinely ignore posters with paid advertising in their sigs.  You should too.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!