openchannel: return error on hash creation failure

Return an error instead of just logging when chainhash.NewHash fails in
the ChanPending handler. The hash variable would be nil and crash on the
subsequent String() call.
This commit is contained in:
Slyghtning 2026-02-19 09:48:54 +01:00
parent eaf7883bcf
commit 52d884cec1
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF

View file

@ -693,8 +693,8 @@ func (m *Manager) openChannelPsbt(ctx context.Context,
update.ChanPending.Txid,
)
if err != nil {
log.Infof("Error creating hash for channel "+
"open tx: %v", err)
return nil, fmt.Errorf("error creating "+
"hash for channel open tx: %w", err)
}
chanOutpoint := &wire.OutPoint{