@@ -168,7 +168,7 @@ MessageProcessingResult CInstantSendManager::ProcessMessage(NodeId from, std::st
168168 }
169169
170170 LOCK (cs_pendingLocks);
171- pendingInstantSendLocks.emplace (hash, std::make_pair ( from, islock) );
171+ pendingInstantSendLocks.emplace (hash, instantsend::PendingISLockFromPeer{ from, islock} );
172172 return ret;
173173}
174174
@@ -239,7 +239,7 @@ instantsend::PendingState CInstantSendManager::ProcessPendingInstantSendLocks()
239239
240240Uint256HashSet CInstantSendManager::ProcessPendingInstantSendLocks (
241241 const Consensus::LLMQParams& llmq_params, int signOffset, bool ban,
242- const Uint256HashMap<std::pair<NodeId, instantsend::InstantSendLockPtr> >& pend,
242+ const Uint256HashMap<instantsend::PendingISLockFromPeer >& pend,
243243 std::vector<std::pair<NodeId, MessageProcessingResult>>& peer_activity)
244244{
245245 CBLSBatchVerifier<NodeId, uint256> batchVerifier (false , true , 8 );
@@ -249,8 +249,8 @@ Uint256HashSet CInstantSendManager::ProcessPendingInstantSendLocks(
249249 size_t alreadyVerified = 0 ;
250250 for (const auto & p : pend) {
251251 const auto & hash = p.first ;
252- auto nodeId = p.second .first ;
253- const auto & islock = p.second .second ;
252+ auto nodeId = p.second .node_id ;
253+ const auto & islock = p.second .islock ;
254254
255255 if (batchVerifier.badSources .count (nodeId)) {
256256 continue ;
@@ -321,8 +321,8 @@ Uint256HashSet CInstantSendManager::ProcessPendingInstantSendLocks(
321321 }
322322 for (const auto & p : pend) {
323323 const auto & hash = p.first ;
324- auto nodeId = p.second .first ;
325- const auto & islock = p.second .second ;
324+ auto nodeId = p.second .node_id ;
325+ const auto & islock = p.second .islock ;
326326
327327 if (batchVerifier.badMessages .count (hash)) {
328328 LogPrint (BCLog::INSTANTSEND, " CInstantSendManager::%s -- txid=%s, islock=%s: invalid sig in islock, peer=%d\n " ,
@@ -399,7 +399,7 @@ MessageProcessingResult CInstantSendManager::ProcessInstantSendLock(NodeId from,
399399 } else {
400400 // put it in a separate pending map and try again later
401401 LOCK (cs_pendingLocks);
402- pendingNoTxInstantSendLocks.try_emplace (hash, std::make_pair ( from, islock) );
402+ pendingNoTxInstantSendLocks.try_emplace (hash, instantsend::PendingISLockFromPeer{ from, islock} );
403403 }
404404
405405 // This will also add children TXs to pendingRetryTxs
@@ -442,11 +442,11 @@ void CInstantSendManager::TransactionAddedToMempool(const CTransactionRef& tx)
442442 LOCK (cs_pendingLocks);
443443 auto it = pendingNoTxInstantSendLocks.begin ();
444444 while (it != pendingNoTxInstantSendLocks.end ()) {
445- if (it->second .second ->txid == tx->GetHash ()) {
445+ if (it->second .islock ->txid == tx->GetHash ()) {
446446 // we received an islock earlier
447447 LogPrint (BCLog::INSTANTSEND, " CInstantSendManager::%s -- txid=%s, islock=%s\n " , __func__,
448448 tx->GetHash ().ToString (), it->first .ToString ());
449- islock = it->second .second ;
449+ islock = it->second .islock ;
450450 pendingInstantSendLocks.try_emplace (it->first , it->second );
451451 pendingNoTxInstantSendLocks.erase (it);
452452 break ;
@@ -539,7 +539,7 @@ void CInstantSendManager::AddNonLockedTx(const CTransactionRef& tx, const CBlock
539539 LOCK (cs_pendingLocks);
540540 auto it = pendingNoTxInstantSendLocks.begin ();
541541 while (it != pendingNoTxInstantSendLocks.end ()) {
542- if (it->second .second ->txid == tx->GetHash ()) {
542+ if (it->second .islock ->txid == tx->GetHash ()) {
543543 // we received an islock earlier, let's put it back into pending and verify/lock
544544 LogPrint (BCLog::INSTANTSEND, " CInstantSendManager::%s -- txid=%s, islock=%s\n " , __func__,
545545 tx->GetHash ().ToString (), it->first .ToString ());
@@ -626,7 +626,7 @@ void CInstantSendManager::TryEmplacePendingLock(const uint256& hash, const NodeI
626626 if (db.KnownInstantSendLock (hash)) return ;
627627 LOCK (cs_pendingLocks);
628628 if (!pendingInstantSendLocks.count (hash)) {
629- pendingInstantSendLocks.emplace (hash, std::make_pair ( id, islock) );
629+ pendingInstantSendLocks.emplace (hash, instantsend::PendingISLockFromPeer{ id, islock} );
630630 }
631631}
632632
@@ -848,11 +848,11 @@ bool CInstantSendManager::GetInstantSendLockByHash(const uint256& hash, instants
848848 LOCK (cs_pendingLocks);
849849 auto it = pendingInstantSendLocks.find (hash);
850850 if (it != pendingInstantSendLocks.end ()) {
851- islock = it->second .second ;
851+ islock = it->second .islock ;
852852 } else {
853853 auto itNoTx = pendingNoTxInstantSendLocks.find (hash);
854854 if (itNoTx != pendingNoTxInstantSendLocks.end ()) {
855- islock = itNoTx->second .second ;
855+ islock = itNoTx->second .islock ;
856856 } else {
857857 return false ;
858858 }
@@ -889,7 +889,7 @@ bool CInstantSendManager::IsWaitingForTx(const uint256& txHash) const
889889 LOCK (cs_pendingLocks);
890890 auto it = pendingNoTxInstantSendLocks.begin ();
891891 while (it != pendingNoTxInstantSendLocks.end ()) {
892- if (it->second .second ->txid == txHash) {
892+ if (it->second .islock ->txid == txHash) {
893893 LogPrint (BCLog::INSTANTSEND, " CInstantSendManager::%s -- txid=%s, islock=%s\n " , __func__, txHash.ToString (),
894894 it->first .ToString ());
895895 return true ;
0 commit comments