multi-scope: update listsinceblock

This commit is contained in:
Roy Lee 2022-08-28 23:28:11 -07:00
parent e9159692fb
commit a0ecaaa6ee
2 changed files with 4 additions and 4 deletions

View file

@ -1466,7 +1466,7 @@ func listSinceBlock(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCCl
start = int32(block.Height) + 1 start = int32(block.Height) + 1
} }
txInfoList, err := w.ListSinceBlock(start, -1, syncBlock.Height) txInfoList, err := w.ListSinceBlock("*", start, -1, syncBlock.Height)
if err != nil { if err != nil {
return nil, err return nil, err
} }

View file

@ -2049,7 +2049,7 @@ outputs:
// ListSinceBlock returns a slice of objects with details about transactions // ListSinceBlock returns a slice of objects with details about transactions
// since the given block. If the block is -1 then all transactions are included. // since the given block. If the block is -1 then all transactions are included.
// This is intended to be used for listsinceblock RPC replies. // This is intended to be used for listsinceblock RPC replies.
func (w *Wallet) ListSinceBlock(start, end, syncHeight int32) ([]btcjson.ListTransactionsResult, error) { func (w *Wallet) ListSinceBlock(accountName string, start, end, syncHeight int32) ([]btcjson.ListTransactionsResult, error) {
txList := []btcjson.ListTransactionsResult{} txList := []btcjson.ListTransactionsResult{}
err := walletdb.View(w.db, func(tx walletdb.ReadTx) error { err := walletdb.View(w.db, func(tx walletdb.ReadTx) error {
txmgrNs := tx.ReadBucket(wtxmgrNamespaceKey) txmgrNs := tx.ReadBucket(wtxmgrNamespaceKey)
@ -2059,8 +2059,8 @@ func (w *Wallet) ListSinceBlock(start, end, syncHeight int32) ([]btcjson.ListTra
detail := detail detail := detail
jsonResults := listTransactions( jsonResults := listTransactions(
tx, &detail, w.Manager, syncHeight, accountName, tx, &detail, w.Manager,
w.chainParams, syncHeight, w.chainParams,
) )
txList = append(txList, jsonResults...) txList = append(txList, jsonResults...)
} }