mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-13 11:09:23 +01:00
rpcserver: correctly compute edge-level lastUpdate
This commit is contained in:
parent
2ebd76bbbb
commit
d08721b32d
1 changed files with 4 additions and 7 deletions
11
rpcserver.go
11
rpcserver.go
|
@ -3777,16 +3777,13 @@ func marshalDbEdge(edgeInfo *channeldb.ChannelEdgeInfo,
|
|||
c2, c1 = c1, c2
|
||||
}
|
||||
|
||||
var (
|
||||
lastUpdate int64
|
||||
)
|
||||
|
||||
if c2 != nil {
|
||||
lastUpdate = c2.LastUpdate.Unix()
|
||||
}
|
||||
var lastUpdate int64
|
||||
if c1 != nil {
|
||||
lastUpdate = c1.LastUpdate.Unix()
|
||||
}
|
||||
if c2 != nil && c2.LastUpdate.Unix() > lastUpdate {
|
||||
lastUpdate = c2.LastUpdate.Unix()
|
||||
}
|
||||
|
||||
edge := &lnrpc.ChannelEdge{
|
||||
ChannelId: edgeInfo.ChannelID,
|
||||
|
|
Loading…
Add table
Reference in a new issue