mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
state: fix BITCOIN_HTLC_TOTHEM_SPENT idata.
We use both union fields idata->btc and idata->htlc, which is clearly wrong. Have peer_tx_revealed_r_value return the HTLC it's talking about. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -1465,11 +1465,12 @@ void peer_htlc_declined(struct peer *peer, const Pkt *pkt)
|
||||
peer->htlc_declined = true;
|
||||
}
|
||||
|
||||
void peer_tx_revealed_r_value(struct peer *peer,
|
||||
const struct bitcoin_event *btc)
|
||||
const struct htlc *peer_tx_revealed_r_value(struct peer *peer,
|
||||
const struct bitcoin_event *btc)
|
||||
{
|
||||
const struct htlc *htlc = (struct htlc *)btc;
|
||||
add_rval(peer, htlc->id);
|
||||
return htlc;
|
||||
}
|
||||
|
||||
static const char *check_changes(const struct peer *old, struct peer *new,
|
||||
|
||||
Reference in New Issue
Block a user