mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2025-06-10 01:16:17 +00:00
Update 12_3_Programming_Bitcoind_with_C.md
This commit is contained in:
parent
a244c08bd8
commit
71c64efcea
@ -53,8 +53,8 @@ printf("Sending %4.8f BTC to %s\n",tx_amount,tx_recipient);
|
||||
|
||||
We're just setting the 0.0005 BTC fee that we've reguarly used to ensure that our test transactions go through quickly:
|
||||
```
|
||||
float tx_fee = 0.0005;
|
||||
float tx_total = tx_amount + tx_fee;
|
||||
float tx_fee = 0.0005;
|
||||
float tx_total = tx_amount + tx_fee;
|
||||
```
|
||||
|
||||
> **WARNING:** A real program would calculate a fee that minimized cost while ensuring the speed was sufficient for the sender.
|
||||
@ -106,7 +106,7 @@ Is the UTXO large enough to pay out your transaction? If so, grab it!
|
||||
```
|
||||
if (tx_amount > tx_total) {
|
||||
|
||||
json_t *lu_txid = NULL;
|
||||
json_t *lu_txid = NULL;
|
||||
lu_txid = json_object_get(lu_data,"txid");
|
||||
tx_id = strdup(json_string_value(lu_txid));
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user