Skip to content

Commit

Permalink
Revert -bootstrap bitcoin#4
Browse files Browse the repository at this point in the history
  • Loading branch information
h4x3rotab committed Dec 20, 2017
1 parent 5dc5f5d commit d1cb253
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
5 changes: 0 additions & 5 deletions src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,11 +358,6 @@ class CRegTestParams : public CChainParams {

// By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("0x00");

pchMessageStartLegacy[0] = 0xfa;
pchMessageStartLegacy[1] = 0xbf;
pchMessageStartLegacy[2] = 0xb5;
pchMessageStartLegacy[3] = 0xda;

pchMessageStart[0] = 0xfa;
pchMessageStart[1] = 0xbf;
Expand Down
5 changes: 1 addition & 4 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,9 +419,6 @@ CNode* CConnman::ConnectNode(CAddress addrConnect, const char *pszDest, bool fCo
uint64_t nonce = GetDeterministicRandomizer(RANDOMIZER_ID_LOCALHOSTNONCE).Write(id).Finalize();
CAddress addr_bind = GetBindAddress(hSocket);
CNode* pnode = new CNode(id, nLocalServices, GetBestHeight(), hSocket, addrConnect, CalculateKeyedNetGroup(addrConnect), nonce, addr_bind, pszDest ? pszDest : "", false);
if (fBTGBootstrapping) {
pnode->fUsesGoldMagic = false;
}
pnode->nServicesExpected = ServiceFlags(addrConnect.nServices & nRelevantServices);
pnode->AddRef();

Expand Down Expand Up @@ -2808,7 +2805,7 @@ void CConnman::PushMessage(CNode* pnode, CSerializedNetMsg&& msg)
std::vector<unsigned char> serializedHeader;
serializedHeader.reserve(CMessageHeader::HEADER_SIZE);
uint256 hash = Hash(msg.data.data(), msg.data.data() + nMessageSize);
CMessageHeader hdr(pnode->GetMagic(Params()), msg.command.c_str(), nMessageSize);
CMessageHeader hdr(Params().MessageStart(), msg.command.c_str(), nMessageSize);
memcpy(hdr.pchChecksum, hash.begin(), CMessageHeader::CHECKSUM_SIZE);

CVectorWriter{SER_NETWORK, INIT_PROTO_VERSION, serializedHeader, 0, hdr};
Expand Down

0 comments on commit d1cb253

Please sign in to comment.