per-commit-secret is a struct secret, not a sha256.

Well, it's generated by shachain, so technically it is a sha256, but
that's an internal detail.  It's a secret.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-07-09 20:47:58 +09:30
committed by Christian Decker
parent 6c98457ef2
commit e217bc1220
12 changed files with 30 additions and 16 deletions

View File

@@ -1245,7 +1245,7 @@ void update_per_commit_point(struct channel *channel,
void peer_got_revoke(struct channel *channel, const u8 *msg)
{
u64 revokenum;
struct sha256 per_commitment_secret;
struct secret per_commitment_secret;
struct pubkey next_per_commitment_point;
struct changed_htlc *changed;
enum onion_type *failcodes;
@@ -1307,7 +1307,7 @@ void peer_got_revoke(struct channel *channel, const u8 *msg)
&per_commitment_secret)) {
channel_fail_permanent(channel,
"Bad per_commitment_secret %s for %"PRIu64,
type_to_string(msg, struct sha256,
type_to_string(msg, struct secret,
&per_commitment_secret),
revokenum);
return;