mirror of
				https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
				synced 2025-10-31 10:27:29 +00:00 
			
		
		
		
	Update 5_2_Resending_a_Transaction_with_RBF.md
This commit is contained in:
		
							parent
							
								
									444171e73c
								
							
						
					
					
						commit
						fa8edab9a3
					
				| @ -8,7 +8,7 @@ If your Bitcoin transaction is stuck, and you're sender, you can resend it using | |||||||
| 
 | 
 | ||||||
| ## Opt-In for RBF | ## Opt-In for RBF | ||||||
| 
 | 
 | ||||||
| RBF is an opt-in Bitcoin feature. Transactions are only eligible for using RBF if they've been created with a special RBF flag. This is done by setting their sequence number (which is typically set automatically, so that it's less than 0xffffffff-1. (4294967294). | RBF is an opt-in Bitcoin feature. Transactions are only eligible for using RBF if they've been created with a special RBF flag. This is done by setting their sequence number (which is typically set automatically, so that it's more than 0 and less than 0xffffffff-1. (4294967294). | ||||||
| 
 | 
 | ||||||
| This is simply done by adding a `sequence` variable to the vins: | This is simply done by adding a `sequence` variable to the vins: | ||||||
| ``` | ``` | ||||||
| @ -54,14 +54,58 @@ _Should I trust transactions with no confirmations?_ No, never. This was true be | |||||||
| 
 | 
 | ||||||
| ### Optional: Always Opt-In for RBF | ### Optional: Always Opt-In for RBF | ||||||
| 
 | 
 | ||||||
| If you prefer, you can _always_ opt in for RBF. Do so by running your `bitcoind` with the `-walletrbf` command or simply adding it to your bitcoin.conf file: | If you prefer, you can _always_ opt in for RBF. Do so by running your `bitcoind` with the `-walletrbf` command. Once you've done this (and restarted your `bitcoind`), then all transactions should have a lower sequence number and be marked as `bip125-replaceable`. | ||||||
| ``` |  | ||||||
| walletrbf=1 |  | ||||||
| ``` |  | ||||||
| Once you've done this (and restarted your `bitcoind`), then all transactions should have a lower sequence number and be marked as `bip125-replaceable`. |  | ||||||
| 
 |  | ||||||
| [[THIS NEEDS TO BE FURTHER TESTED; APPARENTLY DOESN'T WORK WITH walletrbf=1 ... haven't checked with the flag]] |  | ||||||
| 
 | 
 | ||||||
|  | Note the following example generated by `bitcoind`, which uses a sequence number of "1": | ||||||
|  | ``` | ||||||
|  | { | ||||||
|  |   "txid": "d261b9494eb29084f668e1abd75d331fc2d6525dd206b2f5236753b5448ca12c", | ||||||
|  |   "hash": "d261b9494eb29084f668e1abd75d331fc2d6525dd206b2f5236753b5448ca12c", | ||||||
|  |   "size": 226, | ||||||
|  |   "vsize": 226, | ||||||
|  |   "version": 2, | ||||||
|  |   "locktime": 0, | ||||||
|  |   "vin": [ | ||||||
|  |     { | ||||||
|  |       "txid": "4075dbf84303c01adcb0b36cd2c164e2b447192c2d9fbf5fde3b99d0ac7e64b6", | ||||||
|  |       "vout": 1, | ||||||
|  |       "scriptSig": { | ||||||
|  |         "asm": "3045022100b3a0d66abe3429f81a6dc397369d6ac9cb025a2243b68649d95665967fe4365b022038cf037aaab9368268e97203494d1b542e83101e6aaaf97957daf70dee6ee0af[ALL] 022615f4b6417b991530df4bc8c8ee10b8925c741773fead7a5edd89337caeba53", | ||||||
|  |         "hex": "483045022100b3a0d66abe3429f81a6dc397369d6ac9cb025a2243b68649d95665967fe4365b022038cf037aaab9368268e97203494d1b542e83101e6aaaf97957daf70dee6ee0af0121022615f4b6417b991530df4bc8c8ee10b8925c741773fead7a5edd89337caeba53" | ||||||
|  |       }, | ||||||
|  |       "sequence": 1 | ||||||
|  |     } | ||||||
|  |   ], | ||||||
|  |   "vout": [ | ||||||
|  |     { | ||||||
|  |       "value": 0.10000000, | ||||||
|  |       "n": 0, | ||||||
|  |       "scriptPubKey": { | ||||||
|  |         "asm": "OP_DUP OP_HASH160 e7c1345fc8f87c68170b3aa798a956c2fe6a9eff OP_EQUALVERIFY OP_CHECKSIG", | ||||||
|  |         "hex": "76a914e7c1345fc8f87c68170b3aa798a956c2fe6a9eff88ac", | ||||||
|  |         "reqSigs": 1, | ||||||
|  |         "type": "pubkeyhash", | ||||||
|  |         "addresses": [ | ||||||
|  |           "n2eMqTT929pb1RDNuqEnxdaLau1rxy3efi" | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|  |     },  | ||||||
|  |     { | ||||||
|  |       "value": 0.90000000, | ||||||
|  |       "n": 1, | ||||||
|  |       "scriptPubKey": { | ||||||
|  |         "asm": "OP_DUP OP_HASH160 20219e4f3c6bc0f6524d538009e980091b3613e8 OP_EQUALVERIFY OP_CHECKSIG", | ||||||
|  |         "hex": "76a91420219e4f3c6bc0f6524d538009e980091b3613e888ac", | ||||||
|  |         "reqSigs": 1, | ||||||
|  |         "type": "pubkeyhash", | ||||||
|  |         "addresses": [ | ||||||
|  |           "miSrC3FvkPPZgqqvCiQycq7io7wTSVsAFH" | ||||||
|  |         ] | ||||||
|  |       } | ||||||
|  |     } | ||||||
|  |   ] | ||||||
|  | } | ||||||
|  | ``` | ||||||
| > **VERSION WARNING:** The walletrbf flag require Bitcoin Core v.0.14.0. | > **VERSION WARNING:** The walletrbf flag require Bitcoin Core v.0.14.0. | ||||||
| 
 | 
 | ||||||
| ## Understand How RBF Works | ## Understand How RBF Works | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user