routerrpc: expose mission control reset rpc

This commit is contained in:
Joost Jager
2019-05-10 18:00:15 +02:00
parent 3db48dc53f
commit 68f2a04f42
7 changed files with 218 additions and 82 deletions

View File

@@ -59,6 +59,10 @@ var (
Entity: "offchain",
Action: "read",
}},
"/routerrpc.Router/ResetMissionControl": {{
Entity: "offchain",
Action: "write",
}},
}
// DefaultRouterMacFilename is the default name of the router macaroon
@@ -439,3 +443,13 @@ func marshallChannelUpdate(update *lnwire.ChannelUpdate) *ChannelUpdate {
ExtraOpaqueData: update.ExtraOpaqueData,
}
}
// ResetMissionControl clears all mission control state and starts with a clean
// slate.
func (s *Server) ResetMissionControl(ctx context.Context,
req *ResetMissionControlRequest) (*ResetMissionControlResponse, error) {
s.cfg.RouterBackend.MissionControl.ResetHistory()
return &ResetMissionControlResponse{}, nil
}