4 ms·
I think if you just naively did that, you would risk the funds being spent twice if both transactions are included in the block (unlikely, but possible). There
by gomox 9y ago
I think if you just naively did that, you would risk the funds being spent twice if both transactions are included in the block (unlikely, but possible).
There is an implementation of essentially the same concept that you are describing called "replace by fee". I haven't seen it implemented in any wallet software, but apparently it's in Bitcoin Core.
I think the tricky part is getting nodes to relay transactions that can look like double spending.
- tromp 9y agoIt's not possible for a valid block to include multiple transactions spending the same input. All full nodes will reject such a block as invalid.
- gomox 9y agoThanks, I didn't know that.
- makomk 9y agoThis is exactly how replace by fee works. If you use the same inputs, only one of the transactions can be included. The reason it's called replace by fee is that unlike Satoshi's original design for transaction replacement, which he disabled because it could be abused to waste node resources for free by repeatedly replacing transactions, it requires a higher fee for each replacement to discourage abuse. (Bitcoin Cash subsequently removed replace by fee out of some weird belief it was an attack on Satoshi's vision; this was of course nonsense, since he specifically designed transactions to be replaceable. It was also pointless, since it's a voluntary miner policy rather than a consensus rule and there's economic incentive for them to support it.)
- njarboe 9y agoIf your fee was so low that it has not cleared in many days then it is probably not being included in any blocks. Especially in a time like now when fees are increasing, putting in another identical transaction with a high enough fee to get confirmed should work fine. I'm not sure how your wallet software will deal with it though.