mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-22 00:24:19 +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:
@@ -50,6 +50,7 @@ void peer_sign_theircommit(const struct peer *peer,
|
||||
commit, 0,
|
||||
peer->anchor.redeemscript,
|
||||
tal_count(peer->anchor.redeemscript),
|
||||
NULL,
|
||||
&peer->secrets->commit,
|
||||
&peer->us.commitkey,
|
||||
sig);
|
||||
@@ -64,6 +65,7 @@ void peer_sign_ourcommit(const struct peer *peer,
|
||||
commit, 0,
|
||||
peer->anchor.redeemscript,
|
||||
tal_count(peer->anchor.redeemscript),
|
||||
NULL,
|
||||
&peer->secrets->commit,
|
||||
&peer->us.commitkey,
|
||||
sig);
|
||||
@@ -79,6 +81,7 @@ void peer_sign_spend(const struct peer *peer,
|
||||
spend, 0,
|
||||
commit_redeemscript,
|
||||
tal_count(commit_redeemscript),
|
||||
NULL,
|
||||
&peer->secrets->final,
|
||||
&peer->us.finalkey,
|
||||
sig);
|
||||
@@ -92,6 +95,7 @@ void peer_sign_mutual_close(const struct peer *peer,
|
||||
close, 0,
|
||||
peer->anchor.redeemscript,
|
||||
tal_count(peer->anchor.redeemscript),
|
||||
NULL,
|
||||
&peer->secrets->commit,
|
||||
&peer->us.commitkey,
|
||||
sig);
|
||||
|
||||
Reference in New Issue
Block a user