Update 5_5_Sending_a_Raw_Transaction_with_a_Locktime.md

This commit is contained in:
Shannon Appelcline 2017-04-20 15:01:22 -07:00 committed by GitHub
parent 8b38f3f8bf
commit 5650f556af

View File

@ -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.