|
|
@ -778,7 +778,7 @@ static uint256 most_recent_block_hash;
|
|
|
|
|
|
|
|
|
|
|
|
void PeerLogicValidation::NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& pblock) {
|
|
|
|
void PeerLogicValidation::NewPoWValidBlock(const CBlockIndex *pindex, const std::shared_ptr<const CBlock>& pblock) {
|
|
|
|
std::shared_ptr<const CBlockHeaderAndShortTxIDs> pcmpctblock = std::make_shared<const CBlockHeaderAndShortTxIDs> (*pblock, true);
|
|
|
|
std::shared_ptr<const CBlockHeaderAndShortTxIDs> pcmpctblock = std::make_shared<const CBlockHeaderAndShortTxIDs> (*pblock, true);
|
|
|
|
CNetMsgMaker msgMaker(PROTOCOL_VERSION);
|
|
|
|
const CNetMsgMaker msgMaker(PROTOCOL_VERSION);
|
|
|
|
|
|
|
|
|
|
|
|
LOCK(cs_main);
|
|
|
|
LOCK(cs_main);
|
|
|
|
|
|
|
|
|
|
|
@ -960,7 +960,7 @@ void static ProcessGetData(CNode* pfrom, const Consensus::Params& consensusParam
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::deque<CInv>::iterator it = pfrom->vRecvGetData.begin();
|
|
|
|
std::deque<CInv>::iterator it = pfrom->vRecvGetData.begin();
|
|
|
|
std::vector<CInv> vNotFound;
|
|
|
|
std::vector<CInv> vNotFound;
|
|
|
|
CNetMsgMaker msgMaker(pfrom->GetSendVersion());
|
|
|
|
const CNetMsgMaker msgMaker(pfrom->GetSendVersion());
|
|
|
|
LOCK(cs_main);
|
|
|
|
LOCK(cs_main);
|
|
|
|
|
|
|
|
|
|
|
|
while (it != pfrom->vRecvGetData.end()) {
|
|
|
|
while (it != pfrom->vRecvGetData.end()) {
|
|
|
@ -1153,7 +1153,7 @@ inline void static SendBlockTransactions(const CBlock& block, const BlockTransac
|
|
|
|
resp.txn[i] = block.vtx[req.indexes[i]];
|
|
|
|
resp.txn[i] = block.vtx[req.indexes[i]];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
LOCK(cs_main);
|
|
|
|
LOCK(cs_main);
|
|
|
|
CNetMsgMaker msgMaker(pfrom->GetSendVersion());
|
|
|
|
const CNetMsgMaker msgMaker(pfrom->GetSendVersion());
|
|
|
|
int nSendFlags = State(pfrom->GetId())->fWantsCmpctWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS;
|
|
|
|
int nSendFlags = State(pfrom->GetId())->fWantsCmpctWitness ? 0 : SERIALIZE_TRANSACTION_NO_WITNESS;
|
|
|
|
connman.PushMessage(pfrom, msgMaker.Make(nSendFlags, NetMsgType::BLOCKTXN, resp));
|
|
|
|
connman.PushMessage(pfrom, msgMaker.Make(nSendFlags, NetMsgType::BLOCKTXN, resp));
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -1346,7 +1346,7 @@ bool static ProcessMessage(CNode* pfrom, std::string strCommand, CDataStream& vR
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// At this point, the outgoing message serialization version can't change.
|
|
|
|
// At this point, the outgoing message serialization version can't change.
|
|
|
|
CNetMsgMaker msgMaker(pfrom->GetSendVersion());
|
|
|
|
const CNetMsgMaker msgMaker(pfrom->GetSendVersion());
|
|
|
|
|
|
|
|
|
|
|
|
if (strCommand == NetMsgType::VERACK)
|
|
|
|
if (strCommand == NetMsgType::VERACK)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -2721,7 +2721,7 @@ bool SendMessages(CNode* pto, CConnman& connman, std::atomic<bool>& interruptMsg
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
|
|
|
|
|
|
|
|
// If we get here, the outgoing message serialization version is set and can't change.
|
|
|
|
// If we get here, the outgoing message serialization version is set and can't change.
|
|
|
|
CNetMsgMaker msgMaker(pto->GetSendVersion());
|
|
|
|
const CNetMsgMaker msgMaker(pto->GetSendVersion());
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// Message: ping
|
|
|
|
// Message: ping
|
|
|
|