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 <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2019-08-07 11:32:21 +09:30
parent 379079c5f3
commit 99236f86f9
4 changed files with 4 additions and 4 deletions

View file

@ -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);

View file

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

View file

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

View file

@ -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);