@ -11,7 +11,7 @@ bool derive_basepoints(const struct privkey *seed,
struct sha256 * shaseed )
struct sha256 * shaseed )
{
{
struct keys {
struct keys {
struct privkey f , r , p , d ;
struct privkey f , r , h , p , d ;
struct sha256 shaseed ;
struct sha256 shaseed ;
} keys ;
} keys ;
@ -22,8 +22,7 @@ bool derive_basepoints(const struct privkey *seed,
secrets - > funding_privkey = keys . f ;
secrets - > funding_privkey = keys . f ;
secrets - > revocation_basepoint_secret = keys . r . secret ;
secrets - > revocation_basepoint_secret = keys . r . secret ;
secrets - > payment_basepoint_secret = keys . p . secret ;
secrets - > payment_basepoint_secret = keys . p . secret ;
/* We currently make htlc_basepoint_secret the same */
secrets - > htlc_basepoint_secret = keys . h . secret ;
secrets - > htlc_basepoint_secret = keys . p . secret ;
secrets - > delayed_payment_basepoint_secret = keys . d . secret ;
secrets - > delayed_payment_basepoint_secret = keys . d . secret ;
}
}
@ -34,8 +33,8 @@ bool derive_basepoints(const struct privkey *seed,
if ( basepoints ) {
if ( basepoints ) {
if ( ! pubkey_from_privkey ( & keys . r , & basepoints - > revocation )
if ( ! pubkey_from_privkey ( & keys . r , & basepoints - > revocation )
| | ! pubkey_from_privkey ( & keys . p , & basepoints - > htlc )
| | ! pubkey_from_privkey ( & keys . p , & basepoints - > payment )
| | ! pubkey_from_privkey ( & keys . p , & basepoints - > payment )
| | ! pubkey_from_privkey ( & keys . h , & basepoints - > htlc )
| | ! pubkey_from_privkey ( & keys . d , & basepoints - > delayed_payment ) )
| | ! pubkey_from_privkey ( & keys . d , & basepoints - > delayed_payment ) )
return false ;
return false ;
}
}