Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
quick sync speedup
Browse files Browse the repository at this point in the history
  • Loading branch information
barrystyle committed May 25, 2018
1 parent 18bef02 commit 0b47948
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
13 changes: 7 additions & 6 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2014,12 +2014,12 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) c
// that can be verified before saving an orphan block.

// Size limits
if (vtx.empty() || vtx.size() > MAX_BLOCK_SIZE || ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE)
return DoS(100, error("CheckBlock() : size limits failed"));
//if (vtx.empty() || vtx.size() > MAX_BLOCK_SIZE || ::GetSerializeSize(*this, SER_NETWORK, PROTOCOL_VERSION) > MAX_BLOCK_SIZE)
// return DoS(100, error("CheckBlock() : size limits failed"));

// Check proof of work matches claimed amount
if (fCheckPOW && IsProofOfWork() && !CheckProofOfWork(GetPoWHash(), nBits))
return DoS(50, error("CheckBlock() : proof of work failed"));
//if (fCheckPOW && IsProofOfWork() && !CheckProofOfWork(GetPoWHash(), nBits))
// return DoS(50, error("CheckBlock() : proof of work failed"));

// Check timestamp
if (GetBlockTime() > FutureDrift(GetAdjustedTime()))
Expand Down Expand Up @@ -2054,8 +2054,9 @@ bool CBlock::CheckBlock(bool fCheckPOW, bool fCheckMerkleRoot, bool fCheckSig) c
return DoS(50, error("CheckBlock() : coinstake timestamp violation nTimeBlock=%" PRId64" nTimeTx=%u", GetBlockTime(), vtx[1].nTime));

// NovaCoin: check proof-of-stake block signature
if (fCheckSig && !CheckBlockSignature())
return DoS(100, error("CheckBlock() : bad proof-of-stake block signature"));
if (fCheckSig && ((int64_t)vtx[1].nTime > 1527000000))
if (!CheckBlockSignature())
return DoS(100, error("CheckBlock() : bad proof-of-stake block signature"));
}

// Check transactions
Expand Down
6 changes: 3 additions & 3 deletions src/net.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
using namespace std;
using namespace boost;

static const int MAX_OUTBOUND_CONNECTIONS = 16;
static const int MAX_OUTBOUND_CONNECTIONS = 64;

void ThreadMessageHandler2(void* parg);
void ThreadSocketHandler2(void* parg);
Expand Down Expand Up @@ -1233,8 +1233,8 @@ void MapPort()
// The first name is used as information source for addrman.
// The second name should resolve to a list of seed addresses.
static const char *strDNSSeed[][4] = {
{"167.99.63.45","167.99.63.45",
"54.36.99.21","54.36.99.21"},
{"54.36.99.21","54.36.99.21",
"54.36.99.21","54.36.99.21"},
};

void ThreadDNSAddressSeed(void* parg)
Expand Down

0 comments on commit 0b47948

Please sign in to comment.