mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 21:35:11 +01:00
fix: Do not assume size_t == u64
This was causing some compilation trouble on 32bit systems, see #256. Reported-by: @shsmith Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
parent
b0c0e28a43
commit
4b59c4f857
@ -1286,7 +1286,7 @@ int main(int argc, char *argv[])
|
||||
status_failed(WIRE_ONCHAIN_BAD_COMMAND,
|
||||
"Can't allocate %"PRIu64" htlcs", num_htlcs);
|
||||
|
||||
for (size_t i = 0; i < num_htlcs; i++) {
|
||||
for (u64 i = 0; i < num_htlcs; i++) {
|
||||
msg = wire_sync_read(ctx, REQ_FD);
|
||||
if (!msg || !fromwire_onchain_htlc(msg, NULL, &htlcs[i]))
|
||||
status_failed(WIRE_ONCHAIN_BAD_COMMAND,
|
||||
|
@ -31,7 +31,7 @@ bool wallet_add_utxo(struct wallet *w, struct utxo *utxo,
|
||||
bool result = db_exec(
|
||||
__func__, w->db,
|
||||
"INSERT INTO outputs (prev_out_tx, prev_out_index, value, type, "
|
||||
"status, keyindex) VALUES ('%s', %d, %zu, %d, %d, %d);",
|
||||
"status, keyindex) VALUES ('%s', %d, %"PRIu64", %d, %d, %d);",
|
||||
hextxid, utxo->outnum, utxo->amount, type, output_state_available,
|
||||
utxo->keyindex);
|
||||
tal_free(tmpctx);
|
||||
|
Loading…
Reference in New Issue
Block a user