-
Notifications
You must be signed in to change notification settings - Fork 122
[5/?] StaticAddr: Deposit summary RPC #721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5/?] StaticAddr: Deposit summary RPC #721
Conversation
802f510 to
de23774
Compare
2b1aa55 to
6672a00
Compare
0065101 to
4629a74
Compare
7750c43 to
2b9c71f
Compare
2d83df6 to
b3f8669
Compare
872c6ff to
0245989
Compare
d5ac415 to
c660129
Compare
385f3ea to
17618f2
Compare
| } | ||
| return false | ||
| } | ||
| clientDeposits = filter(deposits, f) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we could also filter in the DB but since this is running on the client its not a performance concern. Other thoughts?
6f9539b to
add5263
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯
loopd/swapclient_server.go
Outdated
| func filter(deposits []*deposit.Deposit, f filterFunc) []*clientrpc.Deposit { | ||
| var clientDeposits []*clientrpc.Deposit | ||
| for _, d := range deposits { | ||
| if f(d) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style+nit: if !f(d) { continue }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
cmd/loop/staticaddr.go
Outdated
| var summaryCommand = cli.Command{ | ||
| Name: "summary", | ||
| ShortName: "s", | ||
| Usage: "Display a summary of static address related data.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: i'd suggest using "information" instead of "data"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
add5263 to
48cc041
Compare
This PR introduces an api to query static address related info like unconfirmed/confirmed deposits, loop-ins, summaries.
Sample output: