Commit be6aaf8
committed
devrpc: add read-only FetchReputation RPC
Expose the local reputation subsystem's computed state through a new unary,
read-only FetchReputation method on the devrpc (dev/debug) sub-server. The
handler calls Manager.Snapshot() and marshals the per-channel state into the
new ChannelReputation / BucketOccupancy proto messages.
The reputation manager is wired into the devrpc Config through
PopulateDependencies. It is nil unless the experimental --routing.reputation
flag is set; the handler is nil-safe and returns a clear "reputation
subsystem disabled" error in that case. The method requires a read-only
offchain macaroon permission, and an lncli "fetchreputation" command and a
harness RPC wrapper are added to drive it.
Generated proto stubs regenerated via 'make rpc' (docker-based gen_protos).1 parent 4c0ac85 commit be6aaf8
13 files changed
Lines changed: 768 additions & 21 deletions
File tree
- cmd/commands
- lnrpc/devrpc
- lntest/rpc
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
27 | 37 | | |
28 | 38 | | |
29 | 39 | | |
| |||
60 | 70 | | |
61 | 71 | | |
62 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
21 | 28 | | |
0 commit comments