Skip to content

Commit a891d5b

Browse files
committed
[RPC] Don't skip coinbases in ListReceived
1 parent 8afc832 commit a891d5b

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/wallet/rpcwallet.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2335,25 +2335,29 @@ UniValue ListReceived(const UniValue& params, bool by_label, int nBlockHeight)
23352335
for (std::map<uint256, CWalletTx>::iterator it = pwalletMain->mapWallet.begin(); it != pwalletMain->mapWallet.end(); ++it) {
23362336
const CWalletTx& wtx = (*it).second;
23372337

2338-
if (wtx.IsCoinBase() || !IsFinalTx(wtx.tx, nBlockHeight))
2338+
if (!IsFinalTx(wtx.tx, nBlockHeight)) {
23392339
continue;
2340+
}
23402341

23412342
int nDepth = wtx.GetDepthInMainChain();
2342-
if (nDepth < nMinDepth)
2343+
if (nDepth < nMinDepth) {
23432344
continue;
2345+
}
23442346

23452347
for (const CTxOut& txout : wtx.tx->vout) {
23462348
CTxDestination address;
2347-
if (!ExtractDestination(txout.scriptPubKey, address))
2349+
if (!ExtractDestination(txout.scriptPubKey, address)) {
23482350
continue;
2351+
}
23492352

23502353
if (has_filtered_address && !(filtered_address == address)) {
23512354
continue;
23522355
}
23532356

23542357
isminefilter mine = IsMine(*pwalletMain, address);
2355-
if (!(mine & filter))
2358+
if (!(mine & filter)) {
23562359
continue;
2360+
}
23572361

23582362
tallyitem& item = mapTally[address];
23592363
item.nAmount += txout.nValue;

0 commit comments

Comments
 (0)