From 124178ba74b1b82c1741c1c50b6df758a6fe7e3e Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 3 Mar 2016 22:20:32 +0300 Subject: [PATCH] Fix tests --- src/Makefile.test.include | 2 +- src/test/Checkpoints_tests.cpp | 2 +- src/test/DoS_tests.cpp | 2 +- src/test/README.md | 8 +-- src/test/accounting_tests.cpp | 2 +- src/test/addrman_tests.cpp | 2 +- src/test/alert_tests.cpp | 6 +- src/test/allocator_tests.cpp | 2 +- src/test/arith_uint256_tests.cpp | 2 +- src/test/base32_tests.cpp | 2 +- src/test/base58_tests.cpp | 2 +- src/test/base64_tests.cpp | 2 +- src/test/bip32_tests.cpp | 50 +++++++-------- src/test/bloom_tests.cpp | 4 +- src/test/checkblock_tests.cpp | 2 +- src/test/coins_tests.cpp | 2 +- src/test/compress_tests.cpp | 2 +- src/test/crypto_tests.cpp | 2 +- src/test/data/bitcoin-util-test.json | 10 +-- src/test/dbwrapper_tests.cpp | 2 +- src/test/getarg_tests.cpp | 2 +- src/test/hash_tests.cpp | 2 +- src/test/key_tests.cpp | 2 +- src/test/limitedmap_tests.cpp | 2 +- src/test/main_tests.cpp | 2 +- src/test/mempool_tests.cpp | 2 +- src/test/merkle_tests.cpp | 2 +- src/test/miner_tests.cpp | 50 +++++++-------- src/test/multisig_tests.cpp | 2 +- src/test/netbase_tests.cpp | 2 +- src/test/pmt_tests.cpp | 2 +- src/test/policyestimator_tests.cpp | 8 +-- src/test/pow_tests.cpp | 81 ++++++++++++------------ src/test/prevector_tests.cpp | 2 +- src/test/reverselock_tests.cpp | 2 +- src/test/rpc_tests.cpp | 2 +- src/test/rpc_wallet_tests.cpp | 2 +- src/test/sanity_tests.cpp | 2 +- src/test/scheduler_tests.cpp | 2 +- src/test/script_P2SH_tests.cpp | 2 +- src/test/script_tests.cpp | 2 +- src/test/scriptnum_tests.cpp | 2 +- src/test/serialize_tests.cpp | 2 +- src/test/sighash_tests.cpp | 2 +- src/test/sigopcount_tests.cpp | 2 +- src/test/skiplist_tests.cpp | 2 +- src/test/streams_tests.cpp | 2 +- src/test/test_dash.cpp | 2 +- src/test/{test_bitcoin.h => test_dash.h} | 4 +- src/test/timedata_tests.cpp | 2 +- src/test/transaction_tests.cpp | 6 +- src/test/txvalidationcache_tests.cpp | 2 +- src/test/uint256_tests.cpp | 2 +- src/test/univalue_tests.cpp | 2 +- src/test/util_tests.cpp | 2 +- src/wallet/test/wallet_tests.cpp | 2 +- 56 files changed, 160 insertions(+), 159 deletions(-) rename src/test/{test_bitcoin.h => test_dash.h} (97%) diff --git a/src/Makefile.test.include b/src/Makefile.test.include index cdbe0b7f4b..f92528bf16 100644 --- a/src/Makefile.test.include +++ b/src/Makefile.test.include @@ -78,7 +78,7 @@ BITCOIN_TESTS =\ test/skiplist_tests.cpp \ test/streams_tests.cpp \ test/test_dash.cpp \ - test/test_bitcoin.h \ + test/test_dash.h \ test/timedata_tests.cpp \ test/transaction_tests.cpp \ test/txvalidationcache_tests.cpp \ diff --git a/src/test/Checkpoints_tests.cpp b/src/test/Checkpoints_tests.cpp index b283a1aa4c..1448bbf847 100644 --- a/src/test/Checkpoints_tests.cpp +++ b/src/test/Checkpoints_tests.cpp @@ -9,7 +9,7 @@ #include "checkpoints.h" #include "uint256.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include "chainparams.h" #include diff --git a/src/test/DoS_tests.cpp b/src/test/DoS_tests.cpp index 95342498fa..b66b8169cd 100644 --- a/src/test/DoS_tests.cpp +++ b/src/test/DoS_tests.cpp @@ -13,7 +13,7 @@ #include "serialize.h" #include "util.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/README.md b/src/test/README.md index 9c4ce6f250..f6698570f7 100644 --- a/src/test/README.md +++ b/src/test/README.md @@ -22,14 +22,14 @@ For further reading, I found the following website to be helpful in explaining how the boost unit test framework works: [http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/](http://www.alittlemadness.com/2009/03/31/c-unit-testing-with-boosttest/). -test_bitcoin has some built-in command-line arguments; for +test_dash has some built-in command-line arguments; for example, to run just the getarg_tests verbosely: - test_bitcoin --log_level=all --run_test=getarg_tests + test_dash --log_level=all --run_test=getarg_tests ... or to run just the doubledash test: - test_bitcoin --run_test=getarg_tests/doubledash + test_dash --run_test=getarg_tests/doubledash -Run test_bitcoin --help for the full list. +Run test_dash --help for the full list. diff --git a/src/test/accounting_tests.cpp b/src/test/accounting_tests.cpp index dad191c684..0162354f97 100644 --- a/src/test/accounting_tests.cpp +++ b/src/test/accounting_tests.cpp @@ -5,7 +5,7 @@ #include "wallet/wallet.h" #include "wallet/walletdb.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/addrman_tests.cpp b/src/test/addrman_tests.cpp index a1e6a204fc..909d211db9 100644 --- a/src/test/addrman_tests.cpp +++ b/src/test/addrman_tests.cpp @@ -2,7 +2,7 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "addrman.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/alert_tests.cpp b/src/test/alert_tests.cpp index 0895ef3326..7b8c3cc987 100644 --- a/src/test/alert_tests.cpp +++ b/src/test/alert_tests.cpp @@ -15,7 +15,7 @@ #include "util.h" #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include @@ -224,8 +224,8 @@ BOOST_AUTO_TEST_CASE(PartitionAlert) PartitionCheck(falseFunc, csDummy, &indexDummy[99], nPowTargetSpacing); BOOST_CHECK_MESSAGE(strMiscWarning.empty(), strMiscWarning); - // Test 2: go 3.5 hours without a block, expect a warning: - now += 3*60*60+30*60; + // Test 2: go 52.5 minutes without a block, expect a warning: + now += (3*60*60+30*60)/4; // we have 4x faster blocks SetMockTime(now); PartitionCheck(falseFunc, csDummy, &indexDummy[99], nPowTargetSpacing); BOOST_CHECK(!strMiscWarning.empty()); diff --git a/src/test/allocator_tests.cpp b/src/test/allocator_tests.cpp index 613f6c12d7..7e38fe96a0 100644 --- a/src/test/allocator_tests.cpp +++ b/src/test/allocator_tests.cpp @@ -5,7 +5,7 @@ #include "util.h" #include "support/allocators/secure.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/arith_uint256_tests.cpp b/src/test/arith_uint256_tests.cpp index 53ab7e95ee..696b305ed1 100644 --- a/src/test/arith_uint256_tests.cpp +++ b/src/test/arith_uint256_tests.cpp @@ -12,7 +12,7 @@ #include "arith_uint256.h" #include #include "version.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" BOOST_FIXTURE_TEST_SUITE(arith_uint256_tests, BasicTestingSetup) diff --git a/src/test/base32_tests.cpp b/src/test/base32_tests.cpp index 6422b3a88f..631ce87bd2 100644 --- a/src/test/base32_tests.cpp +++ b/src/test/base32_tests.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/base58_tests.cpp b/src/test/base58_tests.cpp index e5a2e28b2e..c74d9fa197 100644 --- a/src/test/base58_tests.cpp +++ b/src/test/base58_tests.cpp @@ -13,7 +13,7 @@ #include "uint256.h" #include "util.h" #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/base64_tests.cpp b/src/test/base64_tests.cpp index ccad94d946..d46f268261 100644 --- a/src/test/base64_tests.cpp +++ b/src/test/base64_tests.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/bip32_tests.cpp b/src/test/bip32_tests.cpp index ce29e692db..70a8b93368 100644 --- a/src/test/bip32_tests.cpp +++ b/src/test/bip32_tests.cpp @@ -9,7 +9,7 @@ #include "uint256.h" #include "util.h" #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include @@ -38,44 +38,44 @@ struct TestVector { TestVector test1 = TestVector("000102030405060708090a0b0c0d0e0f") - ("xpub661MyMwAqRbcFtXgS5sYJABqqG9YLmC4Q1Rdap9gSE8NqtwybGhePY2gZ29ESFjqJoCu1Rupje8YtGqsefD265TMg7usUDFdp6W1EGMcet8", - "xprv9s21ZrQH143K3QTDL4LXw2F7HEK3wJUD2nW2nRk4stbPy6cq3jPPqjiChkVvvNKmPGJxWUtg6LnF5kejMRNNU3TGtRBeJgk33yuGBxrMPHi", + ("drkvjJe5sJgqomjLo3qGVgD8fcPo43UZPgaaskFEjpgSzpwfyEji7NK1mrdUUC1rtqdST6MW4eFxxt1328RR312x9XZsZUAxNo7pTssukwBT5Tx", + "drkpRsmwKURS9g8uDqs1tGTJwh16JHZ27Q49iCXHQ2rD7fFVix4LRp47wHSYAFD8cPPSNoonYypuVXbPig9vkyTtxX3CoeF6B4KB9ozvafgNEj8", 0x80000000) - ("xpub68Gmy5EdvgibQVfPdqkBBCHxA5htiqg55crXYuXoQRKfDBFA1WEjWgP6LHhwBZeNK1VTsfTFUHCdrfp1bgwQ9xv5ski8PX9rL2dZXvgGDnw", - "xprv9uHRZZhk6KAJC1avXpDAp4MDc3sQKNxDiPvvkX8Br5ngLNv1TxvUxt4cV1rGL5hj6KCesnDYUhd7oWgT11eZG7XnxHrnYeSvkzY7d2bhkJ7", + ("drkvjLuVs1zJu2rKwexyhS5mYeVuNs2umm4bZMg8hv4Zy28xLX2tXbr6tzytFTaZe9XyTJe4vsoPhX57zXPYz2mLDR2bm6yDJ722yp1U4adNnEx", + "drkpRv3MKBiuEwFtNSzj62Kwpj7Cd77NVUYAPoxBN8EL5rSn6EMWr3bD4RnwwWZU26mQ5rhUvH9mstSGSSBeQZk5kb7isWvER224rpdn1q7ivwn", 1) - ("xpub6ASuArnXKPbfEwhqN6e3mwBcDTgzisQN1wXN9BJcM47sSikHjJf3UFHKkNAWbWMiGj7Wf5uMash7SyYq527Hqck2AxYysAA7xmALppuCkwQ", - "xprv9wTYmMFdV23N2TdNG573QoEsfRrWKQgWeibmLntzniatZvR9BmLnvSxqu53Kw1UmYPxLgboyZQaXwTCg8MSY3H2EU4pWcQDnRnrVA1xe8fs", + ("drkvjP5d4oYCHjjPn71RRgye9PPZSF21mnntVgLyJBqNuewAa4Y2FQGQrZt7fY3946FKR2G7iJFVp7Zbaq8NTMwDu4rY4Jp4mk2JcYYFMYERRv6", + "drkpRxDUWyGnde8xCu3ApHDpRTzrgV6UVWGTL8d1xQ192VEzKmreZr1X1zhBMZkXd2YSXwTAj6kCxbPgaNhsXuY4XkcAPHsxUmnvXcx9YgAKCuZ", 0x80000002) - ("xpub6D4BDPcP2GT577Vvch3R8wDkScZWzQzMMUm3PWbmWvVJrZwQY4VUNgqFJPMM3No2dFDFGTsxxpG5uJh7n7epu4trkrX7x7DogT5Uv6fcLW5", - "xprv9z4pot5VBttmtdRTWfWQmoH1taj2axGVzFqSb8C9xaxKymcFzXBDptWmT7FwuEzG3ryjH4ktypQSAewRiNMjANTtpgP4mLTj34bhnZX7UiM", + ("drkvjRgu7LN3zcaoeGoWgHP1WPRhfPtY3LNsqDaeYX8Y5XJbyuj94A6qm1S3DZDyVxgdmYMrKgE7C48a3AGfATUkxX1NeCnCrh5zLETPSpexfvd", + "drkpRzpkZW6eLWzN54qG4sdBnU2zudxzm3rSffrhCjJJCMcRjd3mNbqwvSF6uby9bG3w3QUZKZh8P1DaoaSd7vTFer3pjuSWdi2s8thNBM9vCdA", 2) - ("xpub6FHa3pjLCk84BayeJxFW2SP4XRrFd1JYnxeLeU8EqN3vDfZmbqBqaGJAyiLjTAwm6ZLRQUMv1ZACTj37sR62cfN7fe5JnJ7dh8zL4fiyLHV", - "xprvA2JDeKCSNNZky6uBCviVfJSKyQ1mDYahRjijr5idH2WwLsEd4Hsb2Tyh8RfQMuPh7f7RtyzTtdrbdqqsunu5Mm3wDvUAKRHSC34sJ7in334", + ("drkvjTvHwmV1B6FnikHENYb6Ptb1kDBGfvh5GhTwoUf1PxsDM1MW7voCxatxttDMukqNErV2Tgi4Eo2gbacfFkuxg7UdYzLPgsypLvNEbN6fekp", + "drkpS349PwDbWzfM9YJym8qGfyCJzTFjPeAe79jzTgpmWoB36ig8SNYK81i2avNc3vTN7CcFwUvhHpfkGmM5KLzbrEds99XcBnraHsAXgmc3EUv", 1000000000) - ("xpub6H1LXWLaKsWFhvm6RVpEL9P4KfRZSW7abD2ttkWP3SSQvnyA8FSVqNTEcYFgJS2UaFcxupHiYkro49S8yGasTvXEYBVPamhGW6cFJodrTHy", - "xprvA41z7zogVVwxVSgdKUHDy1SKmdb533PjDz7J6N6mV6uS3ze1ai8FHa8kmHScGpWmj4WggLyQjgPie1rFSruoUihUZREPSL39UNdE3BBDu76", + ("drkvjVe4RT6FJDdzF64gV69phbb1YSkaVRW74wrW3m39c3Fi48kteM3sDh42Xi8Jm1v5iYmZy2drmzjHC11gMcQoXNdkRXkUVMZT9sz9qZGZMZH", + "drkpS4muscpqe83Yft6RsgPzygCJngq3D8yfuQ8YhyCuisZXor5WxnnyP7s6Dn9oxqaSic1Wique8sCsGwMSrR1KyCHQUeHqJhcHaCitRvHHSKf", 0); TestVector test2 = TestVector("fffcf9f6f3f0edeae7e4e1dedbd8d5d2cfccc9c6c3c0bdbab7b4b1aeaba8a5a29f9c999693908d8a8784817e7b7875726f6c696663605d5a5754514e4b484542") - ("xpub661MyMwAqRbcFW31YEwpkMuc5THy2PSt5bDMsktWQcFF8syAmRUapSCGu8ED9W6oDMSgv6Zz8idoc4a6mr8BDzTJY47LJhkJ8UB7WEGuduB", - "xprv9s21ZrQH143K31xYSDQpPDxsXRTUcvj2iNHm5NUtrGiGG5e2DtALGdso3pGz6ssrdK4PFmM8NSpSBHNqPqm55Qn3LqFtT2emdEXVYsCzC2U", + ("drkvjJe5sJgqomjLnfLbbqHR7p7ZJEcz5JqQZL2y2mRGyD4YGDkuHX5xCko4pJ6qc5zQMebHyJv8MxWHjv9eABx7HSZpRQNRDHcUnFZ22sRq6So", + "drkpRsmwKURS9g8uDTNLzRXbPtirYUhSo2JyPnK1gyb363NN1w5Xbxq4NBc8WJzBntwXcrZDJGHMmddapCt2oPrbZtMyG4KLKQDuj4d9wbaoren", 0) - ("xpub69H7F5d8KSRgmmdJg2KhpAK8SR3DjMwAdkxj3ZuxV27CprR9LgpeyGmXUbC6wb7ERfvrnKZjXoUmmDznezpbZb7ap6r1D3tgFxHmwMkQTPH", - "xprv9vHkqa6EV4sPZHYqZznhT2NPtPCjKuDKGY38FBWLvgaDx45zo9WQRUT3dKYnjwih2yJD9mkrocEZXo1ex8G81dwSM1fwqWpWkeS3v86pgKt", + ("drkvjMuq92NoHnZRJvvtjcfJBcX5fCNEnHKh7VnLCaSj3cvVxCCsrnS2MbNKPm4jQAzqZy5TqXusm3MFu5aL3LeXd3E6hT767dkrujfgU3isKDC", + "drkpRw3gbC7Pdgxyjixe8CuUTh8NuSShVzoFwx4NrncVATEKhuXWBEB8X2BP5pFzRxnN2Wo3CGh6Co3iAiWrMgMeW7XNGEjPhtPerUXiJrUD8m1", 0xFFFFFFFF) - ("xpub6ASAVgeehLbnwdqV6UKMHVzgqAG8Gr6riv3Fxxpj8ksbH9ebxaEyBLZ85ySDhKiLDBrQSARLq1uNRts8RuJiHjaDMBU4Zn9h8LZNnBC5y4a", - "xprv9wSp6B7kry3Vj9m1zSnLvN3xH8RdsPP1Mh7fAaR7aRLcQMKTR2vidYEeEg2mUCTAwCd6vnxVrcjfy2kRgVsFawNzmjuHc2YmYRmagcEPdU9", + ("drkvjP4tPdQKfgjXUo95A4ewexCe3wb9KmVPCers7yMVhMgtQVSLUfrLZf9v19Jr9ubwMV11VNmV4FmrZkSfpF8eMBgjEXj9UN1sn7wHJwWQJmy", + "drkpRxCjqo8v1b95ubApYeu7w2owJBfc3Uxx378unBXFpBziACkxo7bSj5xyhAjyADWqvk7vyHtjFoYpbxFd63xn5QxvgxxjUQ7ueFsF5LRhHsN", 1) - ("xpub6DF8uhdarytz3FWdA8TvFSvvAh8dP3283MY7p2V4SeE2wyWmG5mg5EwVvmdMVCQcoNJxGoWaU9DCWh89LojfZ537wTfunKau47EL2dhHKon", - "xprv9zFnWC6h2cLgpmSA46vutJzBcfJ8yaJGg8cX1e5StJh45BBciYTRXSd25UEPVuesF9yog62tGAQtHjXajPPdbRCHuWS6T8XA2ECKADdw4Ef", + ("drkvjRsroePFqL2iaQpDDioWcu8sPUTeRxQeX6Miy31q1F3L5KJVnBP3TZYHqwVywnJDwfTZL1rihP5geYhgj9ZbcX9dpovzguT5htcEZKiw6Mb", + "drkpS11iFp7rBESH1CqxcK3gtykAdiY79ftDMYdmdFBb85M9q2d86d89czMMXxwbBviYEhUdiay7fME2vf2n8wVA5tnDpjVYKW6J84HyYyycqPW", 0xFFFFFFFE) - ("xpub6ERApfZwUNrhLCkDtcHTcxd75RbzS1ed54G1LkBUHQVHQKqhMkhgbmJbZRkrgZw4koxb5JaHWkY4ALHY2grBGRjaDMzQLcgJvLJuZZvRcEL", - "xprvA1RpRA33e1JQ7ifknakTFpgNXPmW2YvmhqLQYMmrj4xJXXWYpDPS3xz7iAxn8L39njGVyuoseXzU6rcxFLJ8HFsTjSyQbLYnMpCqE2VbFWc", + ("drkvjT3ticKcSizRsN3oxCd3zQq4JCw1Uw39Yo5cVkiEr1JaXfdRsrK3z5uPUbdV99pfu77C8WvRjzQYJBs5R2g7Ksr66iFVFCYVa7gp6JUy6u3", + "drkpS2BkAn4CndPzJA5ZLnsEGVSMYT1UCeWiPFMf9xszxqcQHNx4CJ4A9WiTAffypM6pnGmL2Qk73iocjn89etPemjTPeg2rTi7vTeJVcfjAABd", 2) - ("xpub6FnCn6nSzZAw5Tw7cgR9bi15UV96gLZhjDstkXXxvCLsUXBGXPdSnLFbdpq8p9HmGsApME5hQTZ3emM2rnY5agb9rXpVGyy3bdW6EEgAtqt", - "xprvA2nrNbFZABcdryreWet9Ea4LvTJcGsqrMzxHx98MMrotbir7yrKCEXw7nadnHM8Dq38EGfSh6dqA9QWTyefMLEcBYJUuekgW4BYPJcr9E7j", + ("drkvjUQvg3Y7xuJfcdEhgGkjyAD2hGU7jFxECxhVuY4jUoAAbry13VEpAerPYzhmGjBNRAKRQSRqdhRXncvaF8N1e8hfjt5aBZqEFQszktZUYXN", + "drkpS3Yn8DGiJoiE3RGT4rzvFEpKwWYaSyRo3QyYZkEVbdTzMaHdMvyvL5fTF5LyyNBtpad4KANvVpeJnL1fPCkspiC7TXYMX8FeA1e3hMDsE8f", 0); void RunTest(const TestVector &test) { diff --git a/src/test/bloom_tests.cpp b/src/test/bloom_tests.cpp index f3915a26bf..f89b7e6259 100644 --- a/src/test/bloom_tests.cpp +++ b/src/test/bloom_tests.cpp @@ -14,7 +14,7 @@ #include "uint256.h" #include "util.h" #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include @@ -492,7 +492,7 @@ BOOST_AUTO_TEST_CASE(rolling_bloom) if (rb1.contains(RandomData())) ++nHits; } - // Run test_bitcoin with --log_level=message to see BOOST_TEST_MESSAGEs: + // Run test_dash with --log_level=message to see BOOST_TEST_MESSAGEs: BOOST_TEST_MESSAGE("RollingBloomFilter got " << nHits << " false positives (~100 expected)"); // Insanely unlikely to get a fp count outside this range: diff --git a/src/test/checkblock_tests.cpp b/src/test/checkblock_tests.cpp index c945a95adc..8dff0bf653 100644 --- a/src/test/checkblock_tests.cpp +++ b/src/test/checkblock_tests.cpp @@ -6,7 +6,7 @@ #include "consensus/validation.h" #include "main.h" // For CheckBlock #include "primitives/block.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include "utiltime.h" #include diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp index 3fe536f91a..075dbc6930 100644 --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -5,7 +5,7 @@ #include "coins.h" #include "random.h" #include "uint256.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include "main.h" #include "consensus/validation.h" diff --git a/src/test/compress_tests.cpp b/src/test/compress_tests.cpp index 35e4458bba..d03ba08e38 100644 --- a/src/test/compress_tests.cpp +++ b/src/test/compress_tests.cpp @@ -4,7 +4,7 @@ #include "compressor.h" #include "util.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/crypto_tests.cpp b/src/test/crypto_tests.cpp index 0b46d718d1..9e2467e60b 100644 --- a/src/test/crypto_tests.cpp +++ b/src/test/crypto_tests.cpp @@ -10,7 +10,7 @@ #include "crypto/hmac_sha512.h" #include "random.h" #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/data/bitcoin-util-test.json b/src/test/data/bitcoin-util-test.json index e65adcdfd0..36135da209 100644 --- a/src/test/data/bitcoin-util-test.json +++ b/src/test/data/bitcoin-util-test.json @@ -57,7 +57,7 @@ "outaddr=0.001:XijDvbYpPmznwgpWD3DkdYNfGmRP2KoVSk"], "output_cmp": "txcreatesign.hex" }, - { "exec": "./bitcoin-tx", + { "exec": "./dash-tx", "args": ["-create", "in=4d49a71ec9da436f71ec4ee231d04f292a29cd316f598bb7068feccabdc59485:0", @@ -67,21 +67,21 @@ "outaddr=0.001:193P6LtvS4nCnkDvM9uXn1gsSRqh4aDAz7"], "output_cmp": "txcreatesign.hex" }, - { "exec": "./bitcoin-tx", + { "exec": "./dash-tx", "args": ["-create", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", "outdata=4:badhexdata"], "return_code": 1 }, - { "exec": "./bitcoin-tx", + { "exec": "./dash-tx", "args": ["-create", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", "outdata=badhexdata"], "return_code": 1 }, - { "exec": "./bitcoin-tx", + { "exec": "./dash-tx", "args": ["-create", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", @@ -89,7 +89,7 @@ "outdata=4:54686973204f505f52455455524e207472616e73616374696f6e206f7574707574207761732063726561746564206279206d6f646966696564206372656174657261777472616e73616374696f6e2e"], "output_cmp": "txcreatedata1.hex" }, - { "exec": "./bitcoin-tx", + { "exec": "./dash-tx", "args": ["-create", "in=5897de6bd6027a475eadd57019d4e6872c396d0716c4875a5f1a6fcfdf385c1f:0", diff --git a/src/test/dbwrapper_tests.cpp b/src/test/dbwrapper_tests.cpp index e399315870..e40f7d885b 100644 --- a/src/test/dbwrapper_tests.cpp +++ b/src/test/dbwrapper_tests.cpp @@ -5,7 +5,7 @@ #include "dbwrapper.h" #include "uint256.h" #include "random.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include // for 'operator+=()' #include diff --git a/src/test/getarg_tests.cpp b/src/test/getarg_tests.cpp index 9f59de3ef5..aae8e4d3eb 100644 --- a/src/test/getarg_tests.cpp +++ b/src/test/getarg_tests.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "util.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/hash_tests.cpp b/src/test/hash_tests.cpp index 35079d1614..13939a7090 100644 --- a/src/test/hash_tests.cpp +++ b/src/test/hash_tests.cpp @@ -4,7 +4,7 @@ #include "hash.h" #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp index 7b83bcee9b..a3504ab5b2 100644 --- a/src/test/key_tests.cpp +++ b/src/test/key_tests.cpp @@ -9,7 +9,7 @@ #include "uint256.h" #include "util.h" #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/limitedmap_tests.cpp b/src/test/limitedmap_tests.cpp index faaddffad8..18304f909c 100644 --- a/src/test/limitedmap_tests.cpp +++ b/src/test/limitedmap_tests.cpp @@ -4,7 +4,7 @@ #include "limitedmap.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/main_tests.cpp b/src/test/main_tests.cpp index 0bd011b3b0..a59323895f 100644 --- a/src/test/main_tests.cpp +++ b/src/test/main_tests.cpp @@ -6,7 +6,7 @@ #include "chainparams.h" #include "main.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/mempool_tests.cpp b/src/test/mempool_tests.cpp index 1347d23656..b87741204e 100644 --- a/src/test/mempool_tests.cpp +++ b/src/test/mempool_tests.cpp @@ -5,7 +5,7 @@ #include "txmempool.h" #include "util.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/merkle_tests.cpp b/src/test/merkle_tests.cpp index 1e31f2e679..51e762093a 100644 --- a/src/test/merkle_tests.cpp +++ b/src/test/merkle_tests.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "consensus/merkle.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include "random.h" #include diff --git a/src/test/miner_tests.cpp b/src/test/miner_tests.cpp index 6c0c415beb..d9aba92de2 100644 --- a/src/test/miner_tests.cpp +++ b/src/test/miner_tests.cpp @@ -16,7 +16,7 @@ #include "util.h" #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include @@ -114,7 +114,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) tx.vin[0].prevout.hash = txFirst[0]->GetHash(); tx.vin[0].prevout.n = 0; tx.vout.resize(1); - tx.vout[0].nValue = 5000000000LL; + tx.vout[0].nValue = 50000000000LL; for (unsigned int i = 0; i < 1001; ++i) { tx.vout[0].nValue -= 1000000; @@ -128,7 +128,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) mempool.clear(); tx.vin[0].prevout.hash = txFirst[0]->GetHash(); - tx.vout[0].nValue = 5000000000LL; + tx.vout[0].nValue = 50000000000LL; for (unsigned int i = 0; i < 1001; ++i) { tx.vout[0].nValue -= 1000000; @@ -150,7 +150,7 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) tx.vin[0].scriptSig << vchData << OP_DROP; tx.vin[0].scriptSig << OP_1; tx.vin[0].prevout.hash = txFirst[0]->GetHash(); - tx.vout[0].nValue = 5000000000LL; + tx.vout[0].nValue = 50000000000LL; for (unsigned int i = 0; i < 128; ++i) { tx.vout[0].nValue -= 10000000; @@ -172,17 +172,17 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) // child with higher priority than parent tx.vin[0].scriptSig = CScript() << OP_1; tx.vin[0].prevout.hash = txFirst[1]->GetHash(); - tx.vout[0].nValue = 4900000000LL; + tx.vout[0].nValue = 49000000000LL; hash = tx.GetHash(); - mempool.addUnchecked(hash, entry.Fee(100000000LL).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); + mempool.addUnchecked(hash, entry.Fee(1000000000LL).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); tx.vin[0].prevout.hash = hash; tx.vin.resize(2); tx.vin[1].scriptSig = CScript() << OP_1; tx.vin[1].prevout.hash = txFirst[0]->GetHash(); tx.vin[1].prevout.n = 0; - tx.vout[0].nValue = 5900000000LL; + tx.vout[0].nValue = 59000000000LL; hash = tx.GetHash(); - mempool.addUnchecked(hash, entry.Fee(400000000LL).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); + mempool.addUnchecked(hash, entry.Fee(4000000000LL).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); delete pblocktemplate; mempool.clear(); @@ -202,11 +202,11 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) tx.vin[0].prevout.hash = txFirst[0]->GetHash(); tx.vin[0].prevout.n = 0; tx.vin[0].scriptSig = CScript() << OP_1; - tx.vout[0].nValue = 4900000000LL; + tx.vout[0].nValue = 49000000000LL; script = CScript() << OP_0; tx.vout[0].scriptPubKey = GetScriptForDestination(CScriptID(script)); hash = tx.GetHash(); - mempool.addUnchecked(hash, entry.Fee(10000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); + mempool.addUnchecked(hash, entry.Fee(100000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); tx.vin[0].prevout.hash = hash; tx.vin[0].scriptSig = CScript() << std::vector(script.begin(), script.end()); tx.vout[0].nValue -= 1000000; @@ -218,25 +218,25 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) // double spend txn pair in mempool, template creation fails tx.vin[0].prevout.hash = txFirst[0]->GetHash(); tx.vin[0].scriptSig = CScript() << OP_1; - tx.vout[0].nValue = 4900000000LL; + tx.vout[0].nValue = 49000000000LL; tx.vout[0].scriptPubKey = CScript() << OP_1; hash = tx.GetHash(); - mempool.addUnchecked(hash, entry.Fee(100000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); + mempool.addUnchecked(hash, entry.Fee(1000000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); tx.vout[0].scriptPubKey = CScript() << OP_2; hash = tx.GetHash(); - mempool.addUnchecked(hash, entry.Fee(100000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); + mempool.addUnchecked(hash, entry.Fee(1000000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); BOOST_CHECK_THROW(CreateNewBlock(chainparams, scriptPubKey), std::runtime_error); mempool.clear(); // subsidy changing - int nHeight = chainActive.Height(); - chainActive.Tip()->nHeight = 209999; - BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); - delete pblocktemplate; - chainActive.Tip()->nHeight = 210000; - BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); - delete pblocktemplate; - chainActive.Tip()->nHeight = nHeight; + // int nHeight = chainActive.Height(); + // chainActive.Tip()->nHeight = 209999; + // BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); + // delete pblocktemplate; + // chainActive.Tip()->nHeight = 210000; + // BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); + // delete pblocktemplate; + // chainActive.Tip()->nHeight = nHeight; // non-final txs in mempool SetMockTime(chainActive.Tip()->GetMedianTimePast()+1); @@ -245,11 +245,11 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) tx.vin[0].prevout.hash = txFirst[0]->GetHash(); tx.vin[0].scriptSig = CScript() << OP_1; tx.vin[0].nSequence = 0; - tx.vout[0].nValue = 4900000000LL; + tx.vout[0].nValue = 49000000000LL; tx.vout[0].scriptPubKey = CScript() << OP_1; tx.nLockTime = chainActive.Tip()->nHeight+1; hash = tx.GetHash(); - mempool.addUnchecked(hash, entry.Fee(100000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); + mempool.addUnchecked(hash, entry.Fee(1000000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx)); BOOST_CHECK(!CheckFinalTx(tx, LOCKTIME_MEDIAN_TIME_PAST)); // time locked @@ -259,11 +259,11 @@ BOOST_AUTO_TEST_CASE(CreateNewBlock_validity) tx2.vin[0].scriptSig = CScript() << OP_1; tx2.vin[0].nSequence = 0; tx2.vout.resize(1); - tx2.vout[0].nValue = 4900000000LL; + tx2.vout[0].nValue = 49000000000LL; tx2.vout[0].scriptPubKey = CScript() << OP_1; tx2.nLockTime = chainActive.Tip()->GetMedianTimePast()+1; hash = tx2.GetHash(); - mempool.addUnchecked(hash, entry.Fee(100000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx2)); + mempool.addUnchecked(hash, entry.Fee(1000000000L).Time(GetTime()).SpendsCoinbase(true).FromTx(tx2)); BOOST_CHECK(!CheckFinalTx(tx2, LOCKTIME_MEDIAN_TIME_PAST)); BOOST_CHECK(pblocktemplate = CreateNewBlock(chainparams, scriptPubKey)); diff --git a/src/test/multisig_tests.cpp b/src/test/multisig_tests.cpp index b65c299adc..3139988670 100644 --- a/src/test/multisig_tests.cpp +++ b/src/test/multisig_tests.cpp @@ -10,7 +10,7 @@ #include "script/interpreter.h" #include "script/sign.h" #include "uint256.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #ifdef ENABLE_WALLET #include "wallet/wallet_ismine.h" diff --git a/src/test/netbase_tests.cpp b/src/test/netbase_tests.cpp index f9840e220a..e6aadcf1af 100644 --- a/src/test/netbase_tests.cpp +++ b/src/test/netbase_tests.cpp @@ -4,7 +4,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "netbase.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/pmt_tests.cpp b/src/test/pmt_tests.cpp index 113b9437e0..4360e7855d 100644 --- a/src/test/pmt_tests.cpp +++ b/src/test/pmt_tests.cpp @@ -10,7 +10,7 @@ #include "arith_uint256.h" #include "version.h" #include "random.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/policyestimator_tests.cpp b/src/test/policyestimator_tests.cpp index 644c3da213..8f291f835d 100644 --- a/src/test/policyestimator_tests.cpp +++ b/src/test/policyestimator_tests.cpp @@ -7,7 +7,7 @@ #include "uint256.h" #include "util.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include @@ -15,11 +15,11 @@ BOOST_FIXTURE_TEST_SUITE(policyestimator_tests, BasicTestingSetup) BOOST_AUTO_TEST_CASE(BlockPolicyEstimates) { - CTxMemPool mpool(CFeeRate(1000)); + CTxMemPool mpool(CFeeRate(10000)); // we have 10x higher fee TestMemPoolEntryHelper entry; - CAmount basefee(2000); + CAmount basefee(20000); // we have 10x higher fee double basepri = 1e6; - CAmount deltaFee(100); + CAmount deltaFee(1000); // we have 10x higher fee double deltaPri=5e5; std::vector feeV[2]; std::vector priV[2]; diff --git a/src/test/pow_tests.cpp b/src/test/pow_tests.cpp index b6eb39bc38..235573b3d9 100644 --- a/src/test/pow_tests.cpp +++ b/src/test/pow_tests.cpp @@ -7,7 +7,7 @@ #include "pow.h" #include "random.h" #include "util.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include @@ -15,61 +15,62 @@ using namespace std; BOOST_FIXTURE_TEST_SUITE(pow_tests, BasicTestingSetup) -/* Test calculation of next difficulty target with no constraints applying */ +/* Test calculation of next difficulty target with DGW */ BOOST_AUTO_TEST_CASE(get_next_work) { SelectParams(CBaseChainParams::MAIN); const Consensus::Params& params = Params().GetConsensus(); - int64_t nLastRetargetTime = 1261130161; // Block #30240 CBlockIndex pindexLast; - pindexLast.nHeight = 32255; - pindexLast.nTime = 1262152739; // Block #32255 - pindexLast.nBits = 0x1d00ffff; - BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00d86a); + pindexLast.nHeight = 123456; + pindexLast.nTime = 1408732489; // Block #123456 + pindexLast.nBits = 0x1b1418d4; + CBlockHeader pblock; + pblock.nTime = 1408732505; // Block #123457 + BOOST_CHECK_EQUAL(GetNextWorkRequired(&pindexLast, &pblock, params), 0x1b06b2f1); // Block #123457 has 0x1d00d86a } /* Test the constraint on the upper bound for next work */ -BOOST_AUTO_TEST_CASE(get_next_work_pow_limit) -{ - SelectParams(CBaseChainParams::MAIN); - const Consensus::Params& params = Params().GetConsensus(); +// BOOST_AUTO_TEST_CASE(get_next_work_pow_limit) +// { +// SelectParams(CBaseChainParams::MAIN); +// const Consensus::Params& params = Params().GetConsensus(); - int64_t nLastRetargetTime = 1231006505; // Block #0 - CBlockIndex pindexLast; - pindexLast.nHeight = 2015; - pindexLast.nTime = 1233061996; // Block #2015 - pindexLast.nBits = 0x1d00ffff; - BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00ffff); -} +// int64_t nLastRetargetTime = 1231006505; // Block #0 +// CBlockIndex pindexLast; +// pindexLast.nHeight = 2015; +// pindexLast.nTime = 1233061996; // Block #2015 +// pindexLast.nBits = 0x1d00ffff; +// BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00ffff); +// } /* Test the constraint on the lower bound for actual time taken */ -BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual) -{ - SelectParams(CBaseChainParams::MAIN); - const Consensus::Params& params = Params().GetConsensus(); +// BOOST_AUTO_TEST_CASE(get_next_work_lower_limit_actual) +// { +// SelectParams(CBaseChainParams::MAIN); +// const Consensus::Params& params = Params().GetConsensus(); - int64_t nLastRetargetTime = 1279008237; // Block #66528 - CBlockIndex pindexLast; - pindexLast.nHeight = 68543; - pindexLast.nTime = 1279297671; // Block #68543 - pindexLast.nBits = 0x1c05a3f4; - BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1c0168fd); -} +// int64_t nLastRetargetTime = 1279008237; // Block #66528 +// CBlockIndex pindexLast; +// pindexLast.nHeight = 68543; +// pindexLast.nTime = 1279297671; // Block #68543 +// pindexLast.nBits = 0x1c05a3f4; +// BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1c0168fd); +// } /* Test the constraint on the upper bound for actual time taken */ -BOOST_AUTO_TEST_CASE(get_next_work_upper_limit_actual) -{ - SelectParams(CBaseChainParams::MAIN); - const Consensus::Params& params = Params().GetConsensus(); +// BOOST_AUTO_TEST_CASE(get_next_work_upper_limit_actual) +// { +// SelectParams(CBaseChainParams::MAIN); +// const Consensus::Params& params = Params().GetConsensus(); - int64_t nLastRetargetTime = 1263163443; // NOTE: Not an actual block time - CBlockIndex pindexLast; - pindexLast.nHeight = 46367; - pindexLast.nTime = 1269211443; // Block #46367 - pindexLast.nBits = 0x1c387f6f; - BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00e1fd); -} +// int64_t nLastRetargetTime = 1263163443; // NOTE: Not an actual block time +// CBlockIndex pindexLast; +// pindexLast.nHeight = 46367; +// pindexLast.nTime = 1269211443; // Block #46367 +// pindexLast.nBits = 0x1c387f6f; +// BOOST_CHECK_EQUAL(CalculateNextWorkRequired(&pindexLast, nLastRetargetTime, params), 0x1d00e1fd); +// } BOOST_AUTO_TEST_CASE(GetBlockProofEquivalentTime_test) { diff --git a/src/test/prevector_tests.cpp b/src/test/prevector_tests.cpp index 01a45b540d..ddfaf6ba46 100644 --- a/src/test/prevector_tests.cpp +++ b/src/test/prevector_tests.cpp @@ -9,7 +9,7 @@ #include "serialize.h" #include "streams.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/reverselock_tests.cpp b/src/test/reverselock_tests.cpp index e7e627ae0f..828c59340e 100644 --- a/src/test/reverselock_tests.cpp +++ b/src/test/reverselock_tests.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include "reverselock.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/rpc_tests.cpp b/src/test/rpc_tests.cpp index 245efcd4b3..186c98325f 100644 --- a/src/test/rpc_tests.cpp +++ b/src/test/rpc_tests.cpp @@ -8,7 +8,7 @@ #include "base58.h" #include "netbase.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/rpc_wallet_tests.cpp b/src/test/rpc_wallet_tests.cpp index 86ce103f16..f75037ec27 100644 --- a/src/test/rpc_wallet_tests.cpp +++ b/src/test/rpc_wallet_tests.cpp @@ -9,7 +9,7 @@ #include "main.h" #include "wallet/wallet.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/sanity_tests.cpp b/src/test/sanity_tests.cpp index 51f9e9f39f..636a4976f4 100644 --- a/src/test/sanity_tests.cpp +++ b/src/test/sanity_tests.cpp @@ -4,7 +4,7 @@ #include "compat/sanity.h" #include "key.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp index 9acd0e2430..1048eb265c 100644 --- a/src/test/scheduler_tests.cpp +++ b/src/test/scheduler_tests.cpp @@ -5,7 +5,7 @@ #include "random.h" #include "scheduler.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/script_P2SH_tests.cpp b/src/test/script_P2SH_tests.cpp index 28b85e8d29..130207f3e3 100644 --- a/src/test/script_P2SH_tests.cpp +++ b/src/test/script_P2SH_tests.cpp @@ -9,7 +9,7 @@ #include "script/script.h" #include "script/script_error.h" #include "script/sign.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #ifdef ENABLE_WALLET #include "wallet/wallet_ismine.h" diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index 10175ebe8e..e6129b18fe 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -13,7 +13,7 @@ #include "script/sign.h" #include "util.h" #include "utilstrencodings.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #if defined(HAVE_CONSENSUS_LIB) #include "script/bitcoinconsensus.h" diff --git a/src/test/scriptnum_tests.cpp b/src/test/scriptnum_tests.cpp index 6b6689c7d3..bd841aedc3 100644 --- a/src/test/scriptnum_tests.cpp +++ b/src/test/scriptnum_tests.cpp @@ -4,7 +4,7 @@ #include "scriptnum10.h" #include "script/script.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/serialize_tests.cpp b/src/test/serialize_tests.cpp index c0fd99aca2..2027938976 100644 --- a/src/test/serialize_tests.cpp +++ b/src/test/serialize_tests.cpp @@ -5,7 +5,7 @@ #include "serialize.h" #include "streams.h" #include "hash.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/sighash_tests.cpp b/src/test/sighash_tests.cpp index 04c6fa9625..f748c2c6ad 100644 --- a/src/test/sighash_tests.cpp +++ b/src/test/sighash_tests.cpp @@ -11,7 +11,7 @@ #include "script/script.h" #include "serialize.h" #include "streams.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include "util.h" #include "utilstrencodings.h" #include "version.h" diff --git a/src/test/sigopcount_tests.cpp b/src/test/sigopcount_tests.cpp index a207fd9216..045dacd0b8 100644 --- a/src/test/sigopcount_tests.cpp +++ b/src/test/sigopcount_tests.cpp @@ -7,7 +7,7 @@ #include "script/script.h" #include "script/standard.h" #include "uint256.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/skiplist_tests.cpp b/src/test/skiplist_tests.cpp index f14b902fe1..9551fa4669 100644 --- a/src/test/skiplist_tests.cpp +++ b/src/test/skiplist_tests.cpp @@ -5,7 +5,7 @@ #include "chain.h" #include "random.h" #include "util.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/streams_tests.cpp b/src/test/streams_tests.cpp index 34f501e867..75c169f1ea 100644 --- a/src/test/streams_tests.cpp +++ b/src/test/streams_tests.cpp @@ -4,7 +4,7 @@ #include "streams.h" #include "support/allocators/zeroafterfree.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include // for 'operator+=()' #include diff --git a/src/test/test_dash.cpp b/src/test/test_dash.cpp index d9ca2ae623..c382d7404d 100644 --- a/src/test/test_dash.cpp +++ b/src/test/test_dash.cpp @@ -4,7 +4,7 @@ #define BOOST_TEST_MODULE Dash Test Suite -#include "test_bitcoin.h" +#include "test_dash.h" #include "chainparams.h" #include "consensus/consensus.h" diff --git a/src/test/test_bitcoin.h b/src/test/test_dash.h similarity index 97% rename from src/test/test_bitcoin.h rename to src/test/test_dash.h index 273bfdd7f4..daa21e9ef3 100644 --- a/src/test/test_bitcoin.h +++ b/src/test/test_dash.h @@ -1,5 +1,5 @@ -#ifndef BITCOIN_TEST_TEST_BITCOIN_H -#define BITCOIN_TEST_TEST_BITCOIN_H +#ifndef BITCOIN_TEST_TEST_DASH_H +#define BITCOIN_TEST_TEST_DASH_H #include "chainparamsbase.h" #include "key.h" diff --git a/src/test/timedata_tests.cpp b/src/test/timedata_tests.cpp index 1224ff8454..70a7000818 100644 --- a/src/test/timedata_tests.cpp +++ b/src/test/timedata_tests.cpp @@ -3,7 +3,7 @@ // file COPYING or http://www.opensource.org/licenses/mit-license.php. // #include "timedata.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/transaction_tests.cpp b/src/test/transaction_tests.cpp index 90addccafb..24b4e6f61e 100644 --- a/src/test/transaction_tests.cpp +++ b/src/test/transaction_tests.cpp @@ -4,7 +4,7 @@ #include "data/tx_invalid.json.h" #include "data/tx_valid.json.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include "clientversion.h" #include "consensus/validation.h" @@ -348,10 +348,10 @@ BOOST_AUTO_TEST_CASE(test_IsStandard) // nDustThreshold = 182 * 12340 / 1000 * 3 minRelayTxFee = CFeeRate(12340); // dust: - t.vout[0].nValue = 6720 - 1; + t.vout[0].nValue = 6735 - 1; BOOST_CHECK(!IsStandardTx(t, reason)); // not dust: - t.vout[0].nValue = 6720; + t.vout[0].nValue = 6735; BOOST_CHECK(IsStandardTx(t, reason)); minRelayTxFee = CFeeRate(DEFAULT_MIN_RELAY_TX_FEE); diff --git a/src/test/txvalidationcache_tests.cpp b/src/test/txvalidationcache_tests.cpp index 66be9d3d5e..5e173caaad 100644 --- a/src/test/txvalidationcache_tests.cpp +++ b/src/test/txvalidationcache_tests.cpp @@ -10,7 +10,7 @@ #include "txmempool.h" #include "random.h" #include "script/standard.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include "utiltime.h" #include diff --git a/src/test/uint256_tests.cpp b/src/test/uint256_tests.cpp index da0a3d73e0..d4f8934db7 100644 --- a/src/test/uint256_tests.cpp +++ b/src/test/uint256_tests.cpp @@ -4,7 +4,7 @@ #include "arith_uint256.h" #include "uint256.h" #include "version.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/test/univalue_tests.cpp b/src/test/univalue_tests.cpp index 945c1acbeb..886317cad2 100644 --- a/src/test/univalue_tests.cpp +++ b/src/test/univalue_tests.cpp @@ -7,7 +7,7 @@ #include #include #include -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include diff --git a/src/test/util_tests.cpp b/src/test/util_tests.cpp index 28cecfffaf..12e84df864 100644 --- a/src/test/util_tests.cpp +++ b/src/test/util_tests.cpp @@ -10,7 +10,7 @@ #include "sync.h" #include "utilstrencodings.h" #include "utilmoneystr.h" -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include diff --git a/src/wallet/test/wallet_tests.cpp b/src/wallet/test/wallet_tests.cpp index e84d588026..719fd3ed12 100644 --- a/src/wallet/test/wallet_tests.cpp +++ b/src/wallet/test/wallet_tests.cpp @@ -9,7 +9,7 @@ #include #include -#include "test/test_bitcoin.h" +#include "test/test_dash.h" #include #include