multi: modify listtxn definition
This commit modifies listtransactiondetails method definition to take in additional params: index_offset and maxTxn
This commit is contained in:
1 parent
037db4278a
commit
cd1df4ac34
7 files changed
+36
-12
No files matched your search
@@ -199,7 +199,9 @@ func assertTxInWallet(t *testing.T, w *lnwallet.LightningWallet,
|
||||
// We'll fetch all of our transaction and go through each one until
|
||||
// finding the expected transaction with its expected confirmation
|
||||
// status.
|
||||
txs, err := w.ListTransactionDetails(0, btcwallet.UnconfirmedHeight, "")
|
||||
txs, err := w.ListTransactionDetails(
|
||||
0, btcwallet.UnconfirmedHeight, "", 0, 1000,
|
||||
)
|
||||
require.NoError(t, err, "unable to retrieve transactions")
|
||||
for _, tx := range txs {
|
||||
if tx.Hash != txHash {
|
||||
@@ -1102,7 +1104,7 @@ func testListTransactionDetails(miner *rpctest.Harness,
|
||||
err = waitForWalletSync(miner, alice)
|
||||
require.NoError(t, err, "Couldn't sync Alice's wallet")
|
||||
txDetails, err := alice.ListTransactionDetails(
|
||||
startHeight, chainTip, "",
|
||||
startHeight, chainTip, "", 0, 1000,
|
||||
)
|
||||
require.NoError(t, err, "unable to fetch tx details")
|
||||
|
||||
@@ -1214,7 +1216,7 @@ func testListTransactionDetails(miner *rpctest.Harness,
|
||||
// with a confirmation height of 0, indicating that it has not been
|
||||
// mined yet.
|
||||
txDetails, err = alice.ListTransactionDetails(
|
||||
chainTip, btcwallet.UnconfirmedHeight, "",
|
||||
chainTip, btcwallet.UnconfirmedHeight, "", 0, 1000,
|
||||
)
|
||||
require.NoError(t, err, "unable to fetch tx details")
|
||||
var mempoolTxFound bool
|
||||
@@ -1266,7 +1268,9 @@ func testListTransactionDetails(miner *rpctest.Harness,
|
||||
// transactions from the last block.
|
||||
err = waitForWalletSync(miner, alice)
|
||||
require.NoError(t, err, "Couldn't sync Alice's wallet")
|
||||
txDetails, err = alice.ListTransactionDetails(chainTip, chainTip, "")
|
||||
txDetails, err = alice.ListTransactionDetails(
|
||||
chainTip, chainTip, "", 0, 1000,
|
||||
)
|
||||
require.NoError(t, err, "unable to fetch tx details")
|
||||
var burnTxFound bool
|
||||
for _, txDetail := range txDetails {
|
||||
@@ -1307,7 +1311,9 @@ func testListTransactionDetails(miner *rpctest.Harness,
|
||||
|
||||
// Query for transactions only in the latest block. We do not expect
|
||||
// any transactions to be returned.
|
||||
txDetails, err = alice.ListTransactionDetails(chainTip, chainTip, "")
|
||||
txDetails, err = alice.ListTransactionDetails(
|
||||
chainTip, chainTip, "", 0, 1000,
|
||||
)
|
||||
require.NoError(t, err, "unexpected error")
|
||||
if len(txDetails) != 0 {
|
||||
t.Fatalf("expected 0 transactions, got: %v", len(txDetails))
|
||||
|
||||
Reference in new issue
Block a user