mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-12 14:12:27 +02:00
routing: convert to node pair based
Previously mission control tracked failures on a per node, per channel basis. This commit changes this to tracking on the level of directed node pairs. The goal of moving to this coarser-grained level is to reduce the number of required payment attempts without compromising payment reliability.
This commit is contained in:
@ -32,24 +32,43 @@ func queryMissionControl(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
type displayNodeHistory struct {
|
||||
Pubkey string
|
||||
LastFailTime int64
|
||||
OtherChanSuccessProb float32
|
||||
Channels []*routerrpc.ChannelHistory
|
||||
Pubkey string
|
||||
LastFailTime int64
|
||||
OtherSuccessProb float32
|
||||
}
|
||||
|
||||
type displayPairHistory struct {
|
||||
NodeFrom, NodeTo string
|
||||
LastFailTime int64
|
||||
SuccessProb float32
|
||||
MinPenalizeAmtSat int64
|
||||
}
|
||||
|
||||
displayResp := struct {
|
||||
Nodes []displayNodeHistory
|
||||
Pairs []displayPairHistory
|
||||
}{}
|
||||
|
||||
for _, n := range snapshot.Nodes {
|
||||
displayResp.Nodes = append(
|
||||
displayResp.Nodes,
|
||||
displayNodeHistory{
|
||||
Pubkey: hex.EncodeToString(n.Pubkey),
|
||||
LastFailTime: n.LastFailTime,
|
||||
OtherChanSuccessProb: n.OtherChanSuccessProb,
|
||||
Channels: n.Channels,
|
||||
Pubkey: hex.EncodeToString(n.Pubkey),
|
||||
LastFailTime: n.LastFailTime,
|
||||
OtherSuccessProb: n.OtherSuccessProb,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
for _, n := range snapshot.Pairs {
|
||||
displayResp.Pairs = append(
|
||||
displayResp.Pairs,
|
||||
displayPairHistory{
|
||||
NodeFrom: hex.EncodeToString(n.NodeFrom),
|
||||
NodeTo: hex.EncodeToString(n.NodeTo),
|
||||
LastFailTime: n.LastFailTime,
|
||||
SuccessProb: n.SuccessProb,
|
||||
MinPenalizeAmtSat: n.MinPenalizeAmtSat,
|
||||
},
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user