return 0 shortchannelid by default

This commit is contained in:
Jesse de Wit
2022-11-21 14:24:53 +01:00
parent ceb3ddb1ee
commit 4cc9fcbc1c

View File

@@ -12,7 +12,8 @@ type ShortChannelID uint64
func NewShortChannelIDFromString(channelID string) (*ShortChannelID, error) { func NewShortChannelIDFromString(channelID string) (*ShortChannelID, error) {
if channelID == "" { if channelID == "" {
return nil, nil c := ShortChannelID(0)
return &c, nil
} }
fields := strings.Split(channelID, "x") fields := strings.Split(channelID, "x")