@@ -131,7 +131,7 @@ PeerMsgRet CCoinJoinClientQueueManager::ProcessDSQueue(const CNode& peer, CDataS
131
131
return {};
132
132
}
133
133
134
- void CCoinJoinClientManager::ProcessMessage (CNode& peer, CConnman& connman, const CTxMemPool& mempool, std::string_view msg_type, CDataStream& vRecv)
134
+ void CCoinJoinClientManager::ProcessMessage (CNode& peer, CChainState& active_chainstate, CConnman& connman, const CTxMemPool& mempool, std::string_view msg_type, CDataStream& vRecv)
135
135
{
136
136
if (m_is_masternode) return ;
137
137
if (!CCoinJoinClientOptions::IsEnabled ()) return ;
@@ -150,7 +150,7 @@ void CCoinJoinClientManager::ProcessMessage(CNode& peer, CConnman& connman, cons
150
150
AssertLockNotHeld (cs_deqsessions);
151
151
LOCK (cs_deqsessions);
152
152
for (auto & session : deqSessions) {
153
- session.ProcessMessage (peer, connman, mempool, msg_type, vRecv);
153
+ session.ProcessMessage (peer, active_chainstate, connman, mempool, msg_type, vRecv);
154
154
}
155
155
}
156
156
}
@@ -167,7 +167,7 @@ CCoinJoinClientSession::CCoinJoinClientSession(CWallet& wallet, CoinJoinWalletMa
167
167
m_is_masternode{is_masternode}
168
168
{}
169
169
170
- void CCoinJoinClientSession::ProcessMessage (CNode& peer, CConnman& connman, const CTxMemPool& mempool, std::string_view msg_type, CDataStream& vRecv)
170
+ void CCoinJoinClientSession::ProcessMessage (CNode& peer, CChainState& active_chainstate, CConnman& connman, const CTxMemPool& mempool, std::string_view msg_type, CDataStream& vRecv)
171
171
{
172
172
if (m_is_masternode) return ;
173
173
if (!CCoinJoinClientOptions::IsEnabled ()) return ;
@@ -202,7 +202,7 @@ void CCoinJoinClientSession::ProcessMessage(CNode& peer, CConnman& connman, cons
202
202
WalletCJLogPrint (m_wallet, " DSFINALTX -- txNew %s" , txNew.ToString ()); /* Continued */
203
203
204
204
// check to see if input is spent already? (and probably not confirmed)
205
- SignFinalTransaction (mempool, txNew, peer, connman );
205
+ SignFinalTransaction (peer, active_chainstate, connman, mempool, txNew );
206
206
207
207
} else if (msg_type == NetMsgType::DSCOMPLETE) {
208
208
if (!mixingMasternode) return ;
@@ -548,7 +548,7 @@ void CCoinJoinClientSession::ProcessPoolStateUpdate(CCoinJoinStatusUpdate psssup
548
548
// check it to make sure it's what we want, then sign it if we agree.
549
549
// If we refuse to sign, it's possible we'll be charged collateral
550
550
//
551
- bool CCoinJoinClientSession::SignFinalTransaction (const CTxMemPool& mempool, const CTransaction& finalTransactionNew, CNode& peer, CConnman& connman )
551
+ bool CCoinJoinClientSession::SignFinalTransaction (CNode& peer, CChainState& active_chainstate, CConnman& connman, const CTxMemPool& mempool, const CTransaction& finalTransactionNew )
552
552
{
553
553
if (!CCoinJoinClientOptions::IsEnabled ()) return false ;
554
554
@@ -577,7 +577,7 @@ bool CCoinJoinClientSession::SignFinalTransaction(const CTxMemPool& mempool, con
577
577
578
578
// Make sure all inputs/outputs are valid
579
579
PoolMessage nMessageID{MSG_NOERR};
580
- if (!IsValidInOuts (mempool, finalMutableTransaction.vin , finalMutableTransaction.vout , nMessageID, nullptr )) {
580
+ if (!IsValidInOuts (active_chainstate, mempool, finalMutableTransaction.vin , finalMutableTransaction.vout , nMessageID, nullptr )) {
581
581
WalletCJLogPrint (m_wallet, " CCoinJoinClientSession::%s -- ERROR! IsValidInOuts() failed: %s\n " , __func__, CoinJoin::GetMessageByID (nMessageID).translated );
582
582
UnlockCoins ();
583
583
keyHolderStorage.ReturnAll ();
0 commit comments