Skip to content

Commit 1300cd1

Browse files
committed
fix: use blockHash
1 parent 4699be4 commit 1300cd1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/evo/deterministicmns.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ std::vector<CDeterministicMNCPtr> CDeterministicMNList::GetProjectedMNPayees(int
221221
}
222222

223223
bool isMNRewardReallocation{false};
224-
if (auto pindex = ::ChainActive()[nHeight]; pindex == nullptr) {
224+
if (auto pindex = WITH_LOCK(::cs_main, return g_chainman.m_blockman.LookupBlockIndex(blockHash)); pindex == nullptr) {
225225
// Something went wrong, probably a race condition in tip and mnlist updates,
226226
// try recovering...
227227
pindex = ::ChainActive().Tip();

0 commit comments

Comments
 (0)