more careful initialization

This commit is contained in:
Brannon King 2020-01-28 12:33:10 -07:00 committed by Anthony Fieroni
parent b83516d107
commit 4be2089329
2 changed files with 6 additions and 4 deletions

View file

@ -147,10 +147,10 @@ public:
consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008 consensus.vDeployments[Consensus::DEPLOYMENT_TESTDUMMY].nTimeout = 1230767999; // December 31, 2008
// The best chain should have at least this much work. // The best chain should have at least this much work.
consensus.nMinimumChainWork = uint256S("00000000000000000000000000000000000000000000024108e3204a44a57a5a"); //621000 consensus.nMinimumChainWork = uint256S("0000000000000000000000000000000000000000000002bfdb5232f364d6774e"); //700k
// By default assume that the signatures in ancestors of this block are valid. // By default assume that the signatures in ancestors of this block are valid.
consensus.defaultAssumeValid = uint256S("7899464514d0d8854919e87eb234fd5f0c35d06418bd5fd3c1a8f7092b2a9317"); //620000 consensus.defaultAssumeValid = uint256S("beaf6432c9a7be3ea8c333bd7a90d4b3e07b0f20c86aa2e5dfebc9eba340201c"); //700k
/** /**
* The message start string is designed to be unlikely to occur in normal data. * The message start string is designed to be unlikely to occur in normal data.

View file

@ -345,9 +345,10 @@ static IntrRecvError InterruptibleRecv(uint8_t* data, size_t len, int timeout, c
// we're approaching the end of the specified total timeout // we're approaching the end of the specified total timeout
int timeout_ms = std::min(endTime - curTime, maxWait); int timeout_ms = std::min(endTime - curTime, maxWait);
#ifdef USE_POLL #ifdef USE_POLL
struct pollfd pollfd = {}; struct pollfd pollfd;
pollfd.fd = hSocket; pollfd.fd = hSocket;
pollfd.events = POLLIN; pollfd.events = POLLIN;
pollfd.revents = 0;
int nRet = poll(&pollfd, 1, timeout_ms); int nRet = poll(&pollfd, 1, timeout_ms);
#else #else
struct timeval tval = MillisToTimeval(timeout_ms); struct timeval tval = MillisToTimeval(timeout_ms);
@ -634,9 +635,10 @@ bool ConnectSocketDirectly(const CService &addrConnect, const SOCKET& hSocket, i
// asynchronously. Thus, use async I/O api (select/poll) // asynchronously. Thus, use async I/O api (select/poll)
// synchronously to check for successful connection with a timeout. // synchronously to check for successful connection with a timeout.
#ifdef USE_POLL #ifdef USE_POLL
struct pollfd pollfd = {}; struct pollfd pollfd;
pollfd.fd = hSocket; pollfd.fd = hSocket;
pollfd.events = POLLIN | POLLOUT; pollfd.events = POLLIN | POLLOUT;
pollfd.revents = 0;
int nRet = poll(&pollfd, 1, nTimeout); int nRet = poll(&pollfd, 1, nTimeout);
#else #else
struct timeval timeout = MillisToTimeval(nTimeout); struct timeval timeout = MillisToTimeval(nTimeout);