diff --git a/src/chainparams.cpp b/src/chainparams.cpp index e1dd34557..25e891232 100644 --- a/src/chainparams.cpp +++ b/src/chainparams.cpp @@ -166,10 +166,10 @@ public: consensus.vDeployments[Consensus::DEPLOYMENT_SEGWIT].nTimeout = 1548288000; // Jan 24, 2019 // 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. - consensus.defaultAssumeValid = uint256S("7899464514d0d8854919e87eb234fd5f0c35d06418bd5fd3c1a8f7092b2a9317"); //620000 + consensus.defaultAssumeValid = uint256S("beaf6432c9a7be3ea8c333bd7a90d4b3e07b0f20c86aa2e5dfebc9eba340201c"); //700k /** * The message start string is designed to be unlikely to occur in normal data. diff --git a/src/net.cpp b/src/net.cpp index 14f5013c2..50fbb8163 100644 --- a/src/net.cpp +++ b/src/net.cpp @@ -1262,7 +1262,8 @@ void CConnman::ThreadSocketHandler() for (const ListenSocket& hListenSocket : vhListenSocket) { #ifdef USE_POLL pollfds[hListenSocket.socket].fd = hListenSocket.socket; - pollfds[hListenSocket.socket].events |= POLLIN; + pollfds[hListenSocket.socket].events = POLLIN; + pollfds[hListenSocket.socket].revents = 0; #else FD_SET(hListenSocket.socket, &fdsetRecv); hSocketMax = std::max(hSocketMax, hListenSocket.socket); @@ -1298,7 +1299,8 @@ void CConnman::ThreadSocketHandler() #ifdef USE_POLL pollfds[pnode->hSocket].fd = pnode->hSocket; - pollfds[pnode->hSocket].events |= POLLERR|POLLHUP; + pollfds[pnode->hSocket].events = POLLERR|POLLHUP; + pollfds[pnode->hSocket].revents = 0; #else FD_SET(pnode->hSocket, &fdsetError); hSocketMax = std::max(hSocketMax, pnode->hSocket); @@ -1307,7 +1309,6 @@ void CConnman::ThreadSocketHandler() if (select_send) { #ifdef USE_POLL - pollfds[pnode->hSocket].fd = pnode->hSocket; pollfds[pnode->hSocket].events |= POLLOUT; #else FD_SET(pnode->hSocket, &fdsetSend); @@ -1316,7 +1317,6 @@ void CConnman::ThreadSocketHandler() } if (select_recv) { #ifdef USE_POLL - pollfds[pnode->hSocket].fd = pnode->hSocket; pollfds[pnode->hSocket].events |= POLLIN; #else FD_SET(pnode->hSocket, &fdsetRecv); diff --git a/src/netbase.cpp b/src/netbase.cpp index 0358d2a44..ab6548032 100644 --- a/src/netbase.cpp +++ b/src/netbase.cpp @@ -272,9 +272,10 @@ static IntrRecvError InterruptibleRecv(uint8_t* data, size_t len, int timeout, c // we're approaching the end of the specified total timeout int timeout_ms = std::min(endTime - curTime, maxWait); #ifdef USE_POLL - struct pollfd pollfd = {}; + struct pollfd pollfd; pollfd.fd = hSocket; pollfd.events = POLLIN; + pollfd.revents = 0; int nRet = poll(&pollfd, 1, timeout_ms); #else struct timeval tval = MillisToTimeval(timeout_ms); @@ -514,9 +515,10 @@ bool ConnectSocketDirectly(const CService &addrConnect, const SOCKET& hSocket, i if (nErr == WSAEINPROGRESS || nErr == WSAEWOULDBLOCK || nErr == WSAEINVAL) { #ifdef USE_POLL - struct pollfd pollfd = {}; + struct pollfd pollfd; pollfd.fd = hSocket; pollfd.events = POLLIN | POLLOUT; + pollfd.revents = 0; int nRet = poll(&pollfd, 1, nTimeout); #else struct timeval timeout = MillisToTimeval(nTimeout);