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 :)