5

If I accept bitcoin for payment, provide a new address for each payment and make it clear to payers that I consider payment complete only after waiting the ~10 minutes for a confirmation, is there a technical reason why I can't immediately spend the bitcoin without waiting for the confirmation? Is it impossible to spend it because the address has no transactions in the block chain?

4

There is no technical reason you can't spend it immediately. A transaction that is dependent on an unconfirmed transaction should be accepted by the network and should eventually make it into a block.

You will almost certainly have to include a transaction fee with the second transaction in order to get it accepted into a block immediately. Otherwise, you will be waiting some time before the second transaction gets committed into a block.

  • 1
    Assuming there is a sufficient fee paid for the 2nd transaction - could it theoretically occur in the same block as the 1st one? – Julian Noble Oct 2 '11 at 5:01
  • 1
    I am not 100% sure, but my understanding is that it doesn't violate any rules to put them in the same block and the client wouldn't have any problem accepting them if they were in the same block, so long as the first transaction was placed first. However, the client currently won't consider a transaction eligible for inclusion in a block unless all of its inputs are already validly in blocks. So unless some mining pool has changed those rules, it won't actually happen. (I am not 100% sure though, if anyone else is, please chime in.) – David Schwartz Oct 2 '11 at 5:18
  • 3
    I checked. The client used to allow you to spend unconfirmed coins. But then if the previous transaction never completes (say because it's broken somehow) then the subsequent transactions will never complete either. To avoid spreading contamination, the behavior was changed so that the client will not allow unconfirmed coins to be spent. – David Schwartz Oct 5 '11 at 15:40
  • Indeed, that's correct. There is one exception though: if the input consumes a send-to-self or self-created change output, it will allow using it without any confirmations. Also, there is no problem for multiple interdependent transactions to be accepted into a miner's memory pool. – Pieter Wuille Apr 22 '12 at 13:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.