Merge pull request #3257 from Crypt-iQ/restorechanbackup_fix_0630
chanrestore: return error instead of nil if failed derivation
This commit is contained in:
commit
108f25dc89
@ -41,7 +41,7 @@ func (c *chanDBRestorer) openChannelShell(backup chanbackup.Single) (
|
|||||||
// shachain...
|
// shachain...
|
||||||
privKey, err := c.secretKeys.DerivePrivKey(backup.ShaChainRootDesc)
|
privKey, err := c.secretKeys.DerivePrivKey(backup.ShaChainRootDesc)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil
|
return nil, fmt.Errorf("unable to derive shachain root key: %v", err)
|
||||||
}
|
}
|
||||||
revRoot, err := chainhash.NewHash(privKey.Serialize())
|
revRoot, err := chainhash.NewHash(privKey.Serialize())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user