mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2025-07-23 09:55:27 +00:00
Update 5_5_Sending_a_Raw_Transaction_with_a_Locktime.md
This commit is contained in:
parent
8b38f3f8bf
commit
5650f556af
@ -42,7 +42,7 @@ _Why Would I Use a Blockheight?_ Unlike with timestamps, there's no fuzziness fo
|
|||||||
|
|
||||||
Once you have figured out your locktime, all you need to do is write up a typical raw transaction, with a third variable for `locktime`:
|
Once you have figured out your locktime, all you need to do is write up a typical raw transaction, with a third variable for `locktime`:
|
||||||
```
|
```
|
||||||
$ $ rawtxhex=$(bitcoin-cli -named createrawtransaction transactions='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs='''{ "'$recipient'": 0.8, "'$changeaddress'": 0.0895 }''' locktime=1119160)
|
$ rawtxhex=$(bitcoin-cli -named createrawtransaction inputs='''[ { "txid": "'$utxo_txid'", "vout": '$utxo_vout' } ]''' outputs='''{ "'$recipient'": 0.8, "'$changeaddress'": 0.0895 }''' locktime=1119160)
|
||||||
```
|
```
|
||||||
Note that this usage of `locktime` is under 500 million, which means that it defines a block height. In this case, it's just a few blocks past the current block height, meant to exemplify how locktime works without sitting around for a long time to wait and see what happens.
|
Note that this usage of `locktime` is under 500 million, which means that it defines a block height. In this case, it's just a few blocks past the current block height, meant to exemplify how locktime works without sitting around for a long time to wait and see what happens.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user