mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-02 18:35:00 +01:00
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:
parent
379079c5f3
commit
99236f86f9
4 changed files with 4 additions and 4 deletions
|
@ -846,7 +846,7 @@ static void process_getfilteredblock_step2(struct bitcoind *bitcoind,
|
||||||
/* This is an interesting output, remember it. */
|
/* This is an interesting output, remember it. */
|
||||||
o = tal(call->outpoints, struct filteredblock_outpoint);
|
o = tal(call->outpoints, struct filteredblock_outpoint);
|
||||||
bitcoin_txid(tx, &o->txid);
|
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->txindex = i;
|
||||||
o->outnum = j;
|
o->outnum = j;
|
||||||
o->scriptPubKey = tal_steal(o, script);
|
o->scriptPubKey = tal_steal(o, script);
|
||||||
|
|
|
@ -75,7 +75,7 @@ struct filteredblock_outpoint {
|
||||||
u32 outnum;
|
u32 outnum;
|
||||||
u32 txindex;
|
u32 txindex;
|
||||||
const u8 *scriptPubKey;
|
const u8 *scriptPubKey;
|
||||||
struct amount_sat satoshis;
|
struct amount_sat amount;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* A struct representing a block with most of the parts filtered out. */
|
/* A struct representing a block with most of the parts filtered out. */
|
||||||
|
|
|
@ -82,7 +82,7 @@ static void got_filteredblock(struct bitcoind *bitcoind,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fbo) {
|
if (fbo) {
|
||||||
txo.amount = fbo->satoshis;
|
txo.amount = fbo->amount;
|
||||||
txo.script = (u8 *)fbo->scriptPubKey;
|
txo.script = (u8 *)fbo->scriptPubKey;
|
||||||
got_txout(bitcoind, &txo, scid);
|
got_txout(bitcoind, &txo, scid);
|
||||||
} else
|
} else
|
||||||
|
|
|
@ -2441,7 +2441,7 @@ void wallet_filteredblock_add(struct wallet *w, struct filteredblock *fb)
|
||||||
sqlite3_bind_int(stmt, 5, o->txindex);
|
sqlite3_bind_int(stmt, 5, o->txindex);
|
||||||
sqlite3_bind_blob(stmt, 6, o->scriptPubKey,
|
sqlite3_bind_blob(stmt, 6, o->scriptPubKey,
|
||||||
tal_count(o->scriptPubKey), SQLITE_TRANSIENT);
|
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);
|
db_exec_prepared(w->db, stmt);
|
||||||
|
|
||||||
outpointfilter_add(w->utxoset_outpoints, &o->txid, o->outnum);
|
outpointfilter_add(w->utxoset_outpoints, &o->txid, o->outnum);
|
||||||
|
|
Loading…
Add table
Reference in a new issue