diff --git a/lightningd/notification.c b/lightningd/notification.c index ddc241512..75b342c50 100644 --- a/lightningd/notification.c +++ b/lightningd/notification.c @@ -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; diff --git a/wallet/wallet.c b/wallet/wallet.c index 0747dcd7f..ccfdeb86c 100644 --- a/wallet/wallet.c +++ b/wallet/wallet.c @@ -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; } diff --git a/wallet/wallet.h b/wallet/wallet.h index d3b4f8d86..f5d16580b 100644 --- a/wallet/wallet.h +++ b/wallet/wallet.h @@ -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;