Post
Topic
Board Development & Technical Discussion
Re: Unspent outputs
by
mr_john
on 03/06/2013, 05:59:15 UTC
There is an RPC command in the official client that can print it, after awhile.
I don't remember the exact word, but I'm almost sure that is starts with "get" and does not take any parameters - see "help" and you should find it easily.
The command you are looking for is "gettxoutsetinfo" (you can enter it also in the debug console of bitcoin-qt).


Didn't know this has happened! Could you tell me more or point me to a relevant source?
AFAIK:
This had nothing to do with LevelDB. As gmaxwell said, due to an error of miners it happened 2 times that a new transaction was created having the same transaction hash as existing transactions before (which in fact means that the previous transaction got overwritten). While it's normally not easy or practically impossible to produce 2 transactions with the same hash value this is not true for coinbase transactions (which can be more easily duplicated - as one can freely enter anything into the coinbase field thus influencing the resulting transaction hash value).

To avoid that this can happen again, a new check was introduced which checks, if the transaction hash exists already in the chain (and has unspent outputs IIRC). But as already 2 transactions existed which broke this rule, these 2 cases are specially handled in code now (you can see this in line 1622 here: https://github.com/bitcoin/bitcoin/blob/v0.8.2/src/main.cpp#L1622 ).

So nothing bad here, one check was missing and got fixed (already some time ago).

Please correct me, if I got something wrong.

John Smiley