<blockquote>
<p>But this doesn't make sense to me... I assumed that transactions must
be mined in the next block, since your transaction also includes the
hash of the previous block in order to prevent double-spending. Is
this assumption correct?</p>
</blockquote>
<p>This is not correct, the transaction does not reference blocks, it references outputs. A block references the previous block.</p>
<p>To answer your question, no, you only have to broadcast your transaction once. In some cases that the mempool is too large, nodes might start deleting transactions from their mempool starting with the ones with the lower fees. In that case if your set fee is too low you might want to rebroadcast it.</p>
<p>Miners of course cannot mine the same transaction twice because as you said a transaction spends the input coins and therefore you cannot spend them again.</p>

CC BY-SA 4.0
2021-01-23T11:49:08.580Z
2021-01-23T11:49:08.580Z
Mike D
<p>From what I know, you can broadcast a transaction including input addresses, output addresses, and amounts, which is signed by your private key.</p>
<p>I often hear that your transaction might not be mined in the next block, since there is a limited capacity, and you can incentivize miners to prioritize your transaction by paying a higher mining fee.</p>
<p>But this doesn't make sense to me... I assumed that transactions must be mined in the next block, since your transaction also includes the hash of the previous block in order to prevent double-spending. Is this assumption correct?</p>
<p>Does this mean, for every block in which your transaction is not included, you need to continuously broadcast a new transaction with the hash of the new current block?</p>
<p>Or, is there a mechanism for just broadcasting a single transaction that can be mined in any future block, but cannot be mined more than once so that you don't accidentally spend extra? If so, how would this work?</p>
<p>I was thinking, because transactions must consume all bitcoin in an address (and you can send some back to yourself if you want), that a miner can not mine the same transaction twice because your address would now be empty in the new state of the blockchain. Is this the case?</p>
<p>Thanks for trying to clarify this for me :)</p>

<transactions><unconfirmed-transactions><doublespend>
Do you have to keep broadcasting transactions until mined?
David Callanan
# Do you have to keep broadcasting transactions until mined?

(Asked by: username_0 on 2021-01-23)

From what I know, you can broadcast a transaction including input addresses, output addresses, and amounts, which is signed by your private key.

I often hear that your transaction might not be mined in the next block, since there is a limited capacity, and you can incentivize miners to prioritize your transaction by paying a higher mining fee.

But this doesn't make sense to me... I assumed that transactions must be mined in the next block, since your transaction also includes the hash of the previous block in order to prevent double-spending. Is this assumption correct?

Does this mean, for every block in which your transaction is not included, you need to continuously broadcast a new transaction with the hash of the new current block?

Or, is there a mechanism for just broadcasting a single transaction that can be mined in any future block, but cannot be mined more than once so that you don't accidentally spend extra? If so, how would this work?

I was thinking, because transactions must consume all bitcoin in an address (and you can send some back to yourself if you want), that a miner can not mine the same transaction twice because your address would now be empty in the new state of the blockchain. Is this the case?

Thanks for trying to clarify this for me :)

**Tags:** transactions, unconfirmed-transactions, doublespend


---

## 1 answers

### Answer by username_1 on 2021-01-23. Score: 1 | Accepted answer

> But this doesn't make sense to me... I assumed that transactions must
> be mined in the next block, since your transaction also includes the
> hash of the previous block in order to prevent double-spending. Is
> this assumption correct?

This is not correct, the transaction does not reference blocks, it references outputs. A block references the previous block.

To answer your question, no, you only have to broadcast your transaction once. In some cases that the mempool is too large, nodes might start deleting transactions from their mempool starting with the ones with the lower fees. In that case if your set fee is too low you might want to rebroadcast it.

Miners of course cannot mine the same transaction twice because as you said a transaction spends the input coins and therefore you cannot spend them again.


---

