Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: bit_kevin on May 23, 2013, 09:14:35 AM



Title: how to check an txid input coin has been spend or not ?
Post by: bit_kevin on May 23, 2013, 09:14:35 AM
Somebody send me 1 BTC to address with txid(t01). Than I spend this 1 BTC to somebody else with txid(t02), this address's amount should be empty.

Now I create raw transaction with txid(t01), than I broadcast it. How does other bitcoind node found it has already spend out? Review all transactions after t01 to check?


Title: Re: how to check an txid input coin has been spend or not ?
Post by: jackjack on May 23, 2013, 09:59:38 AM
I didn't check the source code about that part but I think so...
I'm interested too btw


Title: Re: how to check an txid input coin has been spend or not ?
Post by: 🏰 TradeFortress 🏰 on May 23, 2013, 10:16:30 AM
There is a pool of unspent outputs.


Title: Re: how to check an txid input coin has been spend or not ?
Post by: bit_kevin on May 23, 2013, 12:02:14 PM
There is a pool of unspent outputs.
a pool of ALL unspent outputs ?


Title: Re: how to check an txid input coin has been spend or not ?
Post by: 🏰 TradeFortress 🏰 on May 23, 2013, 12:10:13 PM
There is a pool of unspent outputs.
a pool of ALL unspent outputs ?
Yeah. ALL unspent outputs. I'm not sure how to query it.


Title: Re: how to check an txid input coin has been spend or not ?
Post by: Zeilap on May 23, 2013, 12:29:58 PM
There is a pool of unspent outputs.
a pool of ALL unspent outputs ?

Yes, you can see its size with the command 'gettxoutsetinfo'.

Yeah. ALL unspent outputs. I'm not sure how to query it.

You don't, at least not without modifying the client to add a new RPC command.


Title: Re: how to check an txid input coin has been spend or not ?
Post by: jackjack on May 23, 2013, 12:35:57 PM
Where is that pool? Disk? Not RAM I suppose...


Title: Re: how to check an txid input coin has been spend or not ?
Post by: Zeilap on May 23, 2013, 01:16:18 PM
Where is that pool? Disk? Not RAM I suppose...

LevelDB (it's what the chainstate directory is for). It's partially cached in RAM though.