channeld: get current block height when an HTLC fails.

We need it to put in the error code for
WIRE_INCORRECT_OR_UNKNOWN_PAYMENT_DETAILS.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-08-28 13:35:43 +09:30
committed by Christian Decker
parent 6349222ea2
commit 2600a6ed2e
9 changed files with 33 additions and 10 deletions

View File

@@ -410,6 +410,9 @@ void peer_start_channeld(struct channel *channel,
htlcs, htlc_states,
fulfilled_htlcs, fulfilled_sides,
failed_htlcs, failed_sides,
/* This is an approximation, but failing
* on restart is a corner case */
get_block_height(ld->topology),
channel->scid != NULL,
channel->remote_funding_locked,
&scid,