Post
Topic
Board Bitcoin Discussion
Re: Bitcoin Block Explorer
by
theymos
on 08/02/2011, 06:37:24 UTC
But as a paranoid person as I am, I feel much more comfortable if there's a way to independently count (or estimate) the total amount bitcoins in circulation, without relying on 50 btc x (# of blocks) calculation. -- i.e. can we look at all blocks, add up all the amount flowing into recipient addresses, then subtract whatever flows out of these addresses, and get the total amount of bitcoin in circulation?

It checks out on my database:
Code:
SELECT sum(outputs.value) FROM outputs LEFT JOIN inputs ON (outputs.tx=inputs.prev AND outputs.index=inputs.index) WHERE inputs IS NULL;
       sum
------------------
 5343100.00000000
(1 row)

My database updating script will refuse to accept a double-spend, though I doubt I will catch something that Bitcoin itself doesn't.