Skip to content

Commit

Permalink
Move the increment of nWitnessCacheSize to make the later assertions …
Browse files Browse the repository at this point in the history
…correct.

Signed-off-by: Daira Hopwood <[email protected]>
  • Loading branch information
daira committed Oct 17, 2016
1 parent 83d7b5b commit 8a7d37b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,6 +654,9 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex,
}
}
}
if (nWitnessCacheSize < WITNESS_CACHE_SIZE) {
nWitnessCacheSize += 1;
}

const CBlock* pblock {pblockIn};
CBlock block;
Expand Down Expand Up @@ -694,9 +697,6 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex,
}
}
}
if (nWitnessCacheSize < WITNESS_CACHE_SIZE) {
nWitnessCacheSize += 1;
}
for (std::pair<const uint256, CWalletTx>& wtxItem : mapWallet) {
for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) {
CNoteData* nd = &(item.second);
Expand Down

0 comments on commit 8a7d37b

Please sign in to comment.