mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-19 14:54:22 +01:00
return empty string if scid is nil
This commit is contained in:
@@ -43,6 +43,9 @@ func NewShortChannelIDFromString(channelID string) (*ShortChannelID, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (c *ShortChannelID) ToString() string {
|
func (c *ShortChannelID) ToString() string {
|
||||||
|
if c == nil {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
u := uint64(*c)
|
u := uint64(*c)
|
||||||
blockHeight := (u >> 40) & 0xFFFFFF
|
blockHeight := (u >> 40) & 0xFFFFFF
|
||||||
txIndex := (u >> 16) & 0xFFFFFF
|
txIndex := (u >> 16) & 0xFFFFFF
|
||||||
|
|||||||
Reference in New Issue
Block a user