mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
hsmd: fix capability check for signing splices.
The nomenclature confusion mean that we were ANDING a capability with a message number (29) which always returned non-zero. We really do need a new capability which we can hand to channeld to make these splice txs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -107,7 +107,7 @@ bool hsmd_check_client_capabilities(struct hsmd_client *client,
|
|||||||
return (client->capabilities & HSM_PERM_SIGN_CLOSING_TX) != 0;
|
return (client->capabilities & HSM_PERM_SIGN_CLOSING_TX) != 0;
|
||||||
|
|
||||||
case WIRE_HSMD_SIGN_SPLICE_TX:
|
case WIRE_HSMD_SIGN_SPLICE_TX:
|
||||||
return (client->capabilities & WIRE_HSMD_SIGN_SPLICE_TX) != 0;
|
return (client->capabilities & HSM_PERM_SIGN_SPLICE_TX) != 0;
|
||||||
|
|
||||||
case WIRE_HSMD_SIGN_OPTION_WILL_FUND_OFFER:
|
case WIRE_HSMD_SIGN_OPTION_WILL_FUND_OFFER:
|
||||||
return (client->capabilities & HSM_PERM_SIGN_WILL_FUND_OFFER) != 0;
|
return (client->capabilities & HSM_PERM_SIGN_WILL_FUND_OFFER) != 0;
|
||||||
|
|||||||
@@ -9,6 +9,7 @@
|
|||||||
#define HSM_PERM_SIGN_REMOTE_TX 16
|
#define HSM_PERM_SIGN_REMOTE_TX 16
|
||||||
#define HSM_PERM_SIGN_CLOSING_TX 32
|
#define HSM_PERM_SIGN_CLOSING_TX 32
|
||||||
#define HSM_PERM_SIGN_WILL_FUND_OFFER 64
|
#define HSM_PERM_SIGN_WILL_FUND_OFFER 64
|
||||||
|
#define HSM_PERM_SIGN_SPLICE_TX 128
|
||||||
|
|
||||||
#define HSM_PERM_MASTER 1024
|
#define HSM_PERM_MASTER 1024
|
||||||
#endif /* LIGHTNING_HSMD_PERMISSIONS_H */
|
#endif /* LIGHTNING_HSMD_PERMISSIONS_H */
|
||||||
|
|||||||
@@ -1269,7 +1269,8 @@ bool peer_start_channeld(struct channel *channel,
|
|||||||
| HSM_PERM_COMMITMENT_POINT
|
| HSM_PERM_COMMITMENT_POINT
|
||||||
| HSM_PERM_SIGN_REMOTE_TX
|
| HSM_PERM_SIGN_REMOTE_TX
|
||||||
| HSM_PERM_SIGN_ONCHAIN_TX
|
| HSM_PERM_SIGN_ONCHAIN_TX
|
||||||
| HSM_PERM_SIGN_CLOSING_TX);
|
| HSM_PERM_SIGN_CLOSING_TX
|
||||||
|
| HSM_PERM_SIGN_SPLICE_TX);
|
||||||
|
|
||||||
channel_set_owner(channel,
|
channel_set_owner(channel,
|
||||||
new_channel_subd(channel, ld,
|
new_channel_subd(channel, ld,
|
||||||
|
|||||||
Reference in New Issue
Block a user