multi: return txns first and last indices
In this commit we introduce first and last indices for the tranasctions returned which can be used to seek for further transactions in a pagination style. Signed-off-by: Abdullahi Yunus <abdoollahikbk@gmail.com>
This commit is contained in:
1 parent
cd1df4ac34
commit
762d01536b
13 files changed
+3135
-3044
No files matched your search
+6
-5
@@ -6476,15 +6476,16 @@ func (r *rpcServer) GetTransactions(ctx context.Context,
|
||||
endHeight = req.EndHeight
|
||||
}
|
||||
|
||||
transactions, err := r.server.cc.Wallet.ListTransactionDetails(
|
||||
req.StartHeight, endHeight, req.Account, req.IndexOffset,
|
||||
req.MaxTransactions,
|
||||
)
|
||||
txns, firstIdx, lastIdx, err :=
|
||||
r.server.cc.Wallet.ListTransactionDetails(
|
||||
req.StartHeight, endHeight, req.Account,
|
||||
req.IndexOffset, req.MaxTransactions,
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return lnrpc.RPCTransactionDetails(transactions), nil
|
||||
return lnrpc.RPCTransactionDetails(txns, firstIdx, lastIdx), nil
|
||||
}
|
||||
|
||||
// DescribeGraph returns a description of the latest graph state from the PoV
|
||||
|
||||
Reference in new issue
Block a user