Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: rippledj on January 20, 2015, 06:19:22 PM



Title: When exactly can a txout be respent?
Post by: rippledj on January 20, 2015, 06:19:22 PM
Dear all,

I have a question about the fundamental inner workings of bitcoin-core.  I have searched for the answer, but so far have come up with nothing.  If you know the answer, thanks for saving me time.

So, when you use getrawmempool, you get  a list of transactions that are waiting to be put into the next block.  My question is simply, can those txouts be spent and included in the same block. 

I'm using bitcoin-abe to collect unspent transactions and then build tx from that. 
However, if I'm using getrawmempool to add transactions to the bitcoin-abe database essentially before the block is fully written and accepted to the ledger, can those tx's be indexed and spent within that block?

Thanks


Title: Re: When exactly can a txout be respent?
Post by: TimS on January 20, 2015, 07:30:31 PM
My question is simply, can those txouts be spent and included in the same block.
Yes, unconfirmed txouts can be spent. With the understanding that complications like double spends and transaction malleability mean that those two transactions may not end up in the blockchain as you expect.


Title: Re: When exactly can a txout be respent?
Post by: rippledj on January 20, 2015, 07:41:11 PM
Thanks for the concise reply.  Is that fact mentioned anywhere in the existing documentation?  If not, where would the most convenient and appropriate place to add that fact?

   


Title: Re: When exactly can a txout be respent?
Post by: samson on January 27, 2015, 11:56:29 PM
Isn't this how the dice services operate ?