multi-account: update listsinceblock

This commit is contained in:
Roy Lee 2022-08-28 23:28:11 -07:00
parent 1edb90e0aa
commit 51e700e7d9
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
}
txInfoList, err := w.ListSinceBlock(start, -1, syncBlock.Height)
txInfoList, err := w.ListSinceBlock("*", start, -1, syncBlock.Height)
if err != nil {
return nil, err
}

View file

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