From 99236f86f93627fc84503dcac7896069fda0bfb7 Mon Sep 17 00:00:00 2001 From: Rusty Russell Date: Wed, 7 Aug 2019 11:32:21 +0930 Subject: [PATCH] lightningd: rename 'satoshis' to 'amount' to avoid confusing check-source. The type is enough (it's a struct amount_sat) to avoid confusion with btc or msats. Signed-off-by: Rusty Russell --- lightningd/bitcoind.c | 2 +- lightningd/bitcoind.h | 2 +- lightningd/gossip_control.c | 2 +- wallet/wallet.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lightningd/bitcoind.c b/lightningd/bitcoind.c index b40ee0f44..50c7b068e 100644 --- a/lightningd/bitcoind.c +++ b/lightningd/bitcoind.c @@ -846,7 +846,7 @@ static void process_getfilteredblock_step2(struct bitcoind *bitcoind, /* This is an interesting output, remember it. */ o = tal(call->outpoints, struct filteredblock_outpoint); bitcoin_txid(tx, &o->txid); - o->satoshis = bitcoin_tx_output_get_amount(tx, j); + o->amount = bitcoin_tx_output_get_amount(tx, j); o->txindex = i; o->outnum = j; o->scriptPubKey = tal_steal(o, script); diff --git a/lightningd/bitcoind.h b/lightningd/bitcoind.h index 913b370e8..689d7fed2 100644 --- a/lightningd/bitcoind.h +++ b/lightningd/bitcoind.h @@ -75,7 +75,7 @@ struct filteredblock_outpoint { u32 outnum; u32 txindex; const u8 *scriptPubKey; - struct amount_sat satoshis; + struct amount_sat amount; }; /* A struct representing a block with most of the parts filtered out. */ diff --git a/lightningd/gossip_control.c b/lightningd/gossip_control.c index ac622c401..6001223d2 100644 --- a/lightningd/gossip_control.c +++ b/lightningd/gossip_control.c @@ -82,7 +82,7 @@ static void got_filteredblock(struct bitcoind *bitcoind, } if (fbo) { - txo.amount = fbo->satoshis; + txo.amount = fbo->amount; txo.script = (u8 *)fbo->scriptPubKey; got_txout(bitcoind, &txo, scid); } else diff --git a/wallet/wallet.c b/wallet/wallet.c index e0bab2f59..7f09fe774 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -2441,7 +2441,7 @@ void wallet_filteredblock_add(struct wallet *w, struct filteredblock *fb) sqlite3_bind_int(stmt, 5, o->txindex); sqlite3_bind_blob(stmt, 6, o->scriptPubKey, tal_count(o->scriptPubKey), SQLITE_TRANSIENT); - sqlite3_bind_amount_sat(stmt, 7, o->satoshis); + sqlite3_bind_amount_sat(stmt, 7, o->amount); db_exec_prepared(w->db, stmt); outpointfilter_add(w->utxoset_outpoints, &o->txid, o->outnum);