routing+routerrpc: remove probability estimates from mc state snapshot

Probability estimates are amount dependent. Previously we assumed an
amount, but that starts to make less sense when we make probability more
dependent on amounts in the future.
This commit is contained in:
Joost Jager
2019-09-27 11:19:30 +02:00
parent 559d3c0910
commit fab13900e2
6 changed files with 119 additions and 303 deletions

View File

@ -31,36 +31,17 @@ func queryMissionControl(ctx *cli.Context) error {
return err
}
type displayNodeHistory struct {
Pubkey string
LastFailTime int64
OtherSuccessProb float32
}
type displayPairHistory struct {
NodeFrom, NodeTo string
LastAttemptSuccessful bool
Timestamp 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,
OtherSuccessProb: n.OtherSuccessProb,
},
)
}
for _, n := range snapshot.Pairs {
displayResp.Pairs = append(
displayResp.Pairs,
@ -69,7 +50,6 @@ func queryMissionControl(ctx *cli.Context) error {
NodeTo: hex.EncodeToString(n.NodeTo),
LastAttemptSuccessful: n.LastAttemptSuccessful,
Timestamp: n.Timestamp,
SuccessProb: n.SuccessProb,
MinPenalizeAmtSat: n.MinPenalizeAmtSat,
},
)