aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2018-04-24 13:23:13 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2018-04-24 13:24:21 +0200
commit54865cf9e6a8e5ac7cfe65595172f2348632a9fa (patch)
tree29c5640268573d20ca7b3f7e4e13d8829ce71022 /src
parent6e67754e481f4072dffca04e9f8cbfb5e29725a3 (diff)
parent3ee4be10500710fc8e9b03acf974fd81224c05c4 (diff)
downloadbitcoin-54865cf9e6a8e5ac7cfe65595172f2348632a9fa.tar.xz
Merge #13061: Make tests pass after 2020
3ee4be1 Make tests pass after 2020 (Bernhard M. Wiedemann) Pull request description: Make tests pass after 2020 and also test that 64 bit integers are properly handled Without this patch, the failure was ``` unknown location(0): fatal error: in "rpc_tests/rpc_ban": std::runtime_error: JSON value is not an object as expected test/rpc_tests.cpp(260): last checkpoint ``` I found this when testing reproducible builds for openSUSE Linux packages, building 15 years from now (this is the expected lifespan of today's software) There is 1 other issue in ./src/qt/test/paymentservertests.cpp that fails to verify a cert that expires in 2022 after 10y. ``` QWARN : PaymentServerTests::paymentServerTests() PaymentRequestPlus::getMerchant: Payment request: certificate expired or not yet active: QSslCertificate("3", "01", "Ipbt+DxK8RDQd25/5ueXqw==", (), ("Payment Request Test Merchant"), QMap(), QDateTime(2012-12-10 16:37:24.000 UTC Qt::TimeSpec(UTC)), QDateTime(2022-12-08 16:37:24.000 UTC Qt::TimeSpec(UTC))) FAIL! : PaymentServerTests::paymentServerTests() Compared values are not the same ``` Tree-SHA512: d6c49879b6abbddbecc1168ac24c2d4f4ee9949b615607b3e6ba350c415136017f32cd112708791b063a2f2dc1b12f295f4ee55a346bd2128aa6480088d8db48
Diffstat (limited to 'src')
-rw-r--r--src/test/rpc_tests.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp
index 242e1fb7ff..da591547d7 100644
--- a/src/test/rpc_tests.cpp
+++ b/src/test/rpc_tests.cpp
@@ -247,14 +247,14 @@ BOOST_AUTO_TEST_CASE(rpc_ban)
ar = r.get_array();
BOOST_CHECK_EQUAL(ar.size(), 0U);
- BOOST_CHECK_NO_THROW(r = CallRPC(std::string("setban 127.0.0.0/24 add 1607731200 true")));
+ BOOST_CHECK_NO_THROW(r = CallRPC(std::string("setban 127.0.0.0/24 add 9907731200 true")));
BOOST_CHECK_NO_THROW(r = CallRPC(std::string("listbanned")));
ar = r.get_array();
o1 = ar[0].get_obj();
adr = find_value(o1, "address");
UniValue banned_until = find_value(o1, "banned_until");
BOOST_CHECK_EQUAL(adr.get_str(), "127.0.0.0/24");
- BOOST_CHECK_EQUAL(banned_until.get_int64(), 1607731200); // absolute time check
+ BOOST_CHECK_EQUAL(banned_until.get_int64(), 9907731200); // absolute time check
BOOST_CHECK_NO_THROW(CallRPC(std::string("clearbanned")));