Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/instantsend/instantsend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ instantsend::PendingState CInstantSendManager::FetchPendingLocks()
std::vector<uint256> removed;
removed.reserve(std::min(maxCount, pendingInstantSendLocks.size()));

for (auto& [islockHash, nodeid_islptr_pair] : pendingInstantSendLocks) {
for (auto& [islockHash, pending] : pendingInstantSendLocks) {
// Check if we've reached max count
if (ret.m_pending_is.size() >= maxCount) {
ret.m_pending_work = true;
break;
}
ret.m_pending_is.emplace_back(islockHash, std::move(nodeid_islptr_pair));
ret.m_pending_is.push_back(instantsend::PendingISLockEntry{std::move(pending), islockHash});
removed.emplace_back(islockHash);
}

Expand Down
6 changes: 5 additions & 1 deletion src/instantsend/instantsend.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,13 @@ struct PendingISLockFromPeer {
InstantSendLockPtr islock;
};

struct PendingISLockEntry : PendingISLockFromPeer {
uint256 islock_hash;
};

struct PendingState {
bool m_pending_work{false};
std::vector<std::pair<uint256, PendingISLockFromPeer>> m_pending_is;
std::vector<PendingISLockEntry> m_pending_is;
};
} // namespace instantsend

Expand Down
Loading
Loading