mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
peer: use commit_tx's newly exposed witness script helpers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -581,14 +581,13 @@ static const struct bitcoin_tx *htlc_fulfill_tx(const struct peer *peer,
|
|||||||
htlc = htlc_by_index(ci, i);
|
htlc = htlc_by_index(ci, i);
|
||||||
assert(htlc->r);
|
assert(htlc->r);
|
||||||
|
|
||||||
wscript = bitcoin_redeem_htlc_recv(peer,
|
wscript = wscript_for_htlc(peer, peer->dstate->secpctx, htlc,
|
||||||
peer->dstate->secpctx,
|
&peer->local.finalkey,
|
||||||
&peer->local.finalkey,
|
&peer->remote.finalkey,
|
||||||
&peer->remote.finalkey,
|
&peer->local.locktime,
|
||||||
&htlc->expiry,
|
&peer->remote.locktime,
|
||||||
&peer->remote.locktime,
|
&ci->revocation_hash,
|
||||||
&ci->revocation_hash,
|
REMOTE);
|
||||||
&htlc->rhash);
|
|
||||||
|
|
||||||
tx->input[0].index = ci->map[i];
|
tx->input[0].index = ci->map[i];
|
||||||
bitcoin_txid(ci->tx, &tx->input[0].txid);
|
bitcoin_txid(ci->tx, &tx->input[0].txid);
|
||||||
|
|||||||
Reference in New Issue
Block a user