mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
bitcoin/signature: BIP143 signature support.
We hand in the witness_script: if non-NULL, we use BIP143-style signature hash creation. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -487,6 +487,7 @@ static Pkt *check_and_save_commit_sig(struct peer *peer,
|
||||
ci->tx, 0,
|
||||
peer->anchor.redeemscript,
|
||||
tal_count(peer->anchor.redeemscript),
|
||||
NULL,
|
||||
&peer->them.commitkey,
|
||||
ci->sig))
|
||||
return pkt_err(peer, "Bad signature");
|
||||
@@ -806,6 +807,7 @@ Pkt *accept_pkt_close_sig(struct peer *peer, const Pkt *pkt, bool *acked,
|
||||
if (!check_tx_sig(peer->dstate->secpctx, close_tx, 0,
|
||||
peer->anchor.redeemscript,
|
||||
tal_count(peer->anchor.redeemscript),
|
||||
NULL,
|
||||
&peer->them.commitkey, &theirsig))
|
||||
return pkt_err(peer, "Invalid signature");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user