mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-18 05:12:45 +01:00
wallet: Use struct sha256
for payment_hash in struct forwarding
This commit is contained in:
parent
5f6196a42d
commit
23bfdc307f
@ -120,8 +120,7 @@ void notify_forward_event(struct lightningd *ld,
|
||||
cur->msat_out = AMOUNT_MSAT(0);
|
||||
cur->fee = AMOUNT_MSAT(0);
|
||||
}
|
||||
cur->payment_hash = tal(cur, struct sha256_double);
|
||||
cur->payment_hash->sha = in->payment_hash;
|
||||
cur->payment_hash = tal_dup(cur, struct sha256, &in->payment_hash);
|
||||
cur->status = state;
|
||||
cur->failcode = failcode;
|
||||
cur->received_time = in->received_time;
|
||||
|
@ -2851,8 +2851,8 @@ const struct forwarding *wallet_forwarded_payments_get(struct wallet *w,
|
||||
}
|
||||
|
||||
if (sqlite3_column_type(stmt, 3) != SQLITE_NULL) {
|
||||
cur->payment_hash = tal(ctx, struct sha256_double);
|
||||
sqlite3_column_sha256_double(stmt, 3, cur->payment_hash);
|
||||
cur->payment_hash = tal(ctx, struct sha256);
|
||||
sqlite3_column_sha256(stmt, 3, cur->payment_hash);
|
||||
} else {
|
||||
cur->payment_hash = NULL;
|
||||
}
|
||||
|
@ -190,7 +190,7 @@ static inline const char* forward_status_name(enum forward_status status)
|
||||
struct forwarding {
|
||||
struct short_channel_id channel_in, channel_out;
|
||||
struct amount_msat msat_in, msat_out, fee;
|
||||
struct sha256_double *payment_hash;
|
||||
struct sha256 *payment_hash;
|
||||
enum forward_status status;
|
||||
enum onion_type failcode;
|
||||
struct timeabs received_time;
|
||||
|
Loading…
Reference in New Issue
Block a user