Rebase LBRY on top of Bitcoin 0.17 #263

Closed
lbrynaut wants to merge 18 commits from updated-rebase-0.17-deps into bitcoin-0.17
Showing only changes of commit 2069a84704 - Show all commits

View file

@ -146,7 +146,14 @@ BOOST_AUTO_TEST_CASE(stale_tip_peer_management)
BOOST_CHECK(node->fDisconnect == false);
}
SetMockTime(GetTime() + 3*consensusParams.nPowTargetSpacing + 1);
// STALE_CHECK_INTERVAL is used in PeerLogicValidation::CheckForStaleTipAndEvictPeers
// as minimal time to check tip stale i.e. 10 minutes
// we use maximum value of STALE_CHECK_INTERVAL and nPowTargetSpacing
// NOTE: STALE_CHECK_INTERVAL is static that why we use raw value 10 * 60, sync may need in future
auto time = std::max(long(10) * 60, 3 * consensusParams.nPowTargetSpacing);
SetMockTime(GetTime() + time + 1);
// Now tip should definitely be stale, and we should look for an extra
// outbound peer