-
Notifications
You must be signed in to change notification settings - Fork 48
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
Fix multiple REST issues, allow only one macaroon to be used for lnd connection #210
Merged
+1,478
−221
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f163ac8
server: emit default values in JSON
guggero 5a2bc0c
order: store local node pubkey
guggero 6134952
auctioneer: add IsSubscribed method
guggero 42c6ac7
auctioneer: move mutex lock inside connectServerStream
guggero 2562268
auctioneer: add mutex for subscribedAccts
guggero e7d44f0
poolrpc+rpcserver: add GetInfo and StopDaemon RPCs
guggero d7ed2a2
macaroons: add permissions for GetInfo and StopDaemon
guggero 3e844c8
cmd/pool: add getinfo and stop commands
guggero 6d0bda3
poolrpc+rpcserver: optimize batch snapshot URI for REST
guggero 7c1e8c9
multi: allow only specifying one lnd macaroon
guggero File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package main | ||
|
||
import ( | ||
"context" | ||
|
||
"github.com/lightninglabs/pool/poolrpc" | ||
"github.com/urfave/cli" | ||
) | ||
|
||
var getInfoCommand = cli.Command{ | ||
Name: "getinfo", | ||
Usage: "show info about the daemon's current state", | ||
Description: "Displays basic info about the current state of the Pool " + | ||
"trader daemon", | ||
Action: getInfo, | ||
} | ||
|
||
func getInfo(ctx *cli.Context) error { | ||
client, cleanup, err := getClient(ctx) | ||
if err != nil { | ||
return err | ||
} | ||
defer cleanup() | ||
|
||
resp, err := client.GetInfo( | ||
context.Background(), &poolrpc.GetInfoRequest{}, | ||
) | ||
if err != nil { | ||
return err | ||
} | ||
|
||
printRespJSON(resp) | ||
|
||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Don't we also need the lock for
subscribedAccts
below?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.
Yes, added an extra mutex.