Bitcoin Forum
February 22, 2026, 01:13:43 PM *
News: Community awards 2025
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Bitcoind - Getbalance command  (Read 169 times)
MadGamer (OP)
Legendary
*
Offline Offline

Activity: 1568
Merit: 1031


View Profile
February 06, 2018, 03:58:39 PM
Merited by ABCbits (1)
 #1

I searched a lot and apparently, this command is only able to retrieve the balance If you control the address. I want to know how the blockexplorer etc. do it then? I don't necessarily need the code behind it, just want to know what's the trick here?
achow101
Moderator
Legendary
*
expert
Offline Offline

Activity: 3892
Merit: 7608


Just writing some code


View Profile WWW
February 06, 2018, 04:02:00 PM
Merited by ABCbits (1)
 #2

You can't do it with bitcoind/Bitcoin Core. In order to find the balance of an address, an address index is required. But maintaining an address index is expensive and not that useful since the node does not need it to operate, so one is not maintained. There is no code in Bitcoin Core to build such an address index.

It is important to note that addresses and balances do not exist on a technical level. It requires significant computation to produce balances for all addresses, and requires a lot of additional storage space to store that data.

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!