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
+5
-1
@@ -117,9 +117,13 @@ func RPCTransaction(tx *lnwallet.TransactionDetail) *Transaction {
|
||||
}
|
||||
|
||||
// RPCTransactionDetails returns a set of rpc transaction details.
|
||||
func RPCTransactionDetails(txns []*lnwallet.TransactionDetail) *TransactionDetails {
|
||||
func RPCTransactionDetails(txns []*lnwallet.TransactionDetail, firstIdx,
|
||||
lastIdx uint64) *TransactionDetails {
|
||||
|
||||
txDetails := &TransactionDetails{
|
||||
Transactions: make([]*Transaction, len(txns)),
|
||||
FirstIndex: firstIdx,
|
||||
LastIndex: lastIdx,
|
||||
}
|
||||
|
||||
for i, tx := range txns {
|
||||
|
||||
Reference in new issue
Block a user