lncli: add listchaintxns command

This commit is contained in:
Thomas Preindl authored and Olaoluwa Osuntokun committed 2017-03-08 17:39:38 -08:00
1 parent e1354dca45
commit 9665bb7e54
2 files changed
+23

No files matched your search

+22
View File
@@ -1491,3 +1491,25 @@ func decodePayReq(ctx *cli.Context) error {
printRespJson(resp)
return nil
}
var ListChainTxns = cli.Command{
Name: "listchaintxns",
Usage: "List transactions from the wallet.",
Description: "List all transactions an address of the wallet was involved in.",
Action: listChainTxns,
}
func listChainTxns(ctx *cli.Context) error {
ctxb := context.Background()
client, cleanUp := getClient(ctx)
defer cleanUp()
resp, err := client.GetTransactions(ctxb, &lnrpc.GetTransactionsRequest{})
if err != nil {
return err
}
printRespJson(resp)
return nil
}
+1
View File
@@ -77,6 +77,7 @@ func main() {
GetNetworkInfoCommand,
DebugLevel,
DecodePayReq,
ListChainTxns,
}
if err := app.Run(os.Args); err != nil {