diff --git a/COPYING b/COPYING index 9704b9c94..cf50132fe 100644 --- a/COPYING +++ b/COPYING @@ -2,6 +2,8 @@ The MIT License (MIT) Copyright (c) 2009-2018 The Bitcoin Core developers Copyright (c) 2009-2018 Bitcoin Developers +Copyright (c) 2016-2018 The Zcash developers +Copyright (c) 2018 The Bitcoin Private Developers Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -20,3 +22,20 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +The MIT software license (http://www.opensource.org/licenses/mit-license.php) +above applies to the code directly included in this source distribution. +Dependencies downloaded as part of the build process may be covered by other +open-source licenses. For further details see 'contrib/debian/copyright'. + + +This product includes software developed by the OpenSSL Project for use in the +OpenSSL Toolkit (https://www.openssl.org/). This product includes cryptographic +software written by Eric Young (eay@cryptsoft.com). + + +Although almost all of the Zcash code is licensed under "permissive" open source +licenses, users and distributors should note that when built using the default +build options, Zcash depends on Oracle Berkeley DB 6.2.x, which is licensed +under the GNU Affero General Public License. diff --git a/src/asyncrpcoperation.cpp b/src/asyncrpcoperation.cpp index f32e8d716..1e608270f 100644 --- a/src/asyncrpcoperation.cpp +++ b/src/asyncrpcoperation.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 "asyncrpcoperation.h" +#include #include #include diff --git a/src/asyncrpcqueue.cpp b/src/asyncrpcqueue.cpp index afe6d4bef..779e1f17b 100644 --- a/src/asyncrpcqueue.cpp +++ b/src/asyncrpcqueue.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 "asyncrpcqueue.h" +#include static std::atomic workerCounter(0); diff --git a/src/asyncrpcqueue.h b/src/asyncrpcqueue.h index 1a099a263..5c4b11647 100644 --- a/src/asyncrpcqueue.h +++ b/src/asyncrpcqueue.h @@ -5,7 +5,7 @@ #ifndef ASYNCRPCQUEUE_H #define ASYNCRPCQUEUE_H -#include "asyncrpcoperation.h" +#include #include #include diff --git a/src/gtest/json_test_vectors.cpp b/src/gtest/json_test_vectors.cpp index 94ba5b4c5..205df29bf 100644 --- a/src/gtest/json_test_vectors.cpp +++ b/src/gtest/json_test_vectors.cpp @@ -1,4 +1,4 @@ -#include "json_test_vectors.h" +#include UniValue read_json(const std::string& jsondata) diff --git a/src/gtest/json_test_vectors.h b/src/gtest/json_test_vectors.h index 3639c9121..fca881585 100644 --- a/src/gtest/json_test_vectors.h +++ b/src/gtest/json_test_vectors.h @@ -1,9 +1,9 @@ #include -#include "utilstrencodings.h" -#include "version.h" -#include "serialize.h" -#include "streams.h" +#include +#include +#include +#include #include diff --git a/src/gtest/main.cpp b/src/gtest/main.cpp index d2ae0b23d..8162057a9 100644 --- a/src/gtest/main.cpp +++ b/src/gtest/main.cpp @@ -1,8 +1,8 @@ -#include "gmock/gmock.h" -#include "crypto/common.h" -#include "pubkey.h" -#include "zcash/JoinSplit.hpp" -#include "util.h" +#include +#include +#include +#include +#include #include #include diff --git a/src/gtest/test_block.cpp b/src/gtest/test_block.cpp index a0cdc1162..c97085ab4 100644 --- a/src/gtest/test_block.cpp +++ b/src/gtest/test_block.cpp @@ -1,6 +1,6 @@ #include -#include "primitives/block.h" +#include TEST(block_tests, header_size_is_expected) { diff --git a/src/gtest/test_checkblock.cpp b/src/gtest/test_checkblock.cpp index 53c0efcc7..c04021a8f 100644 --- a/src/gtest/test_checkblock.cpp +++ b/src/gtest/test_checkblock.cpp @@ -1,9 +1,9 @@ #include #include -#include "consensus/validation.h" -#include "main.h" -#include "zcash/Proof.hpp" +#include +#include +#include class MockCValidationState : public CValidationState { public: diff --git a/src/gtest/test_checktransaction.cpp b/src/gtest/test_checktransaction.cpp index bec9cdd6f..e1382e439 100644 --- a/src/gtest/test_checktransaction.cpp +++ b/src/gtest/test_checktransaction.cpp @@ -2,9 +2,9 @@ #include #include -#include "main.h" -#include "primitives/transaction.h" -#include "consensus/validation.h" +#include +#include +#include TEST(checktransaction_tests, check_vpub_not_both_nonzero) { CMutableTransaction tx; @@ -54,7 +54,7 @@ CMutableTransaction GetValidTransaction() { mtx.vin[1].prevout.hash = uint256S("0000000000000000000000000000000000000000000000000000000000000002"); mtx.vin[1].prevout.n = 0; mtx.vout.resize(2); - // mtx.vout[0].scriptPubKey = + // mtx.vout[0].scriptPubKey = mtx.vout[0].nValue = 0; mtx.vout[1].nValue = 0; mtx.vjoinsplit.resize(2); @@ -771,4 +771,4 @@ TEST(checktransaction_tests, BadTxReceivedOverNetwork) FAIL() << "Expected std::ios_base::failure 'Unknown transaction format', got some other exception"; } } -} \ No newline at end of file +} diff --git a/src/gtest/test_circuit.cpp b/src/gtest/test_circuit.cpp index 2cc9dbcbb..a421fe629 100644 --- a/src/gtest/test_circuit.cpp +++ b/src/gtest/test_circuit.cpp @@ -1,7 +1,7 @@ #include -#include "uint256.h" +#include -#include "zcash/util.h" +#include #include #include @@ -12,13 +12,13 @@ #include #include -#include "zcash/IncrementalMerkleTree.hpp" +#include using namespace libsnark; using namespace libzcash; -#include "zcash/circuit/utils.tcc" -#include "zcash/circuit/merkle.tcc" +#include +#include template void test_value_equals(uint64_t i) { diff --git a/src/gtest/test_deprecation.cpp b/src/gtest/test_deprecation.cpp index eb2d7bfc6..72f24d5a3 100644 --- a/src/gtest/test_deprecation.cpp +++ b/src/gtest/test_deprecation.cpp @@ -1,12 +1,12 @@ #include #include -#include "clientversion.h" -#include "deprecation.h" -#include "init.h" -#include "ui_interface.h" -#include "util.h" -#include "chainparams.h" +#include +#include +#include +#include +#include +#include using ::testing::StrictMock; diff --git a/src/gtest/test_equihash.cpp b/src/gtest/test_equihash.cpp index 6134e43c9..8950d4b32 100644 --- a/src/gtest/test_equihash.cpp +++ b/src/gtest/test_equihash.cpp @@ -1,12 +1,12 @@ #if defined(HAVE_CONFIG_H) -#include "config/bitcoin-config.h" +#include #endif #include #include -#include "crypto/equihash.h" -#include "uint256.h" +#include +#include void TestExpandAndCompress(const std::string &scope, size_t bit_len, size_t byte_pad, std::vector compact, diff --git a/src/gtest/test_foundersreward.cpp b/src/gtest/test_foundersreward.cpp deleted file mode 100644 index b5e8acc18..000000000 --- a/src/gtest/test_foundersreward.cpp +++ /dev/null @@ -1,195 +0,0 @@ -#include - -#include "main.h" -#include "utilmoneystr.h" -#include "chainparams.h" -#include "utilstrencodings.h" -#include "zcash/Address.hpp" -#include "wallet/wallet.h" -#include "amount.h" -#include -#include -#include -#include -#include -#include "util.h" - -// To run tests: -// ./zcash-gtest --gtest_filter="founders_reward_test.*" - -// -// Enable this test to generate and print 48 testnet 2-of-3 multisig addresses. -// The output can be copied into chainparams.cpp. -// The temporary wallet file can be renamed as wallet.dat and used for testing with zcashd. -// -#if 0 -TEST(founders_reward_test, create_testnet_2of3multisig) { - ECC_Start(); - SelectParams(CBaseChainParams::TESTNET); - boost::filesystem::path pathTemp = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path(); - boost::filesystem::create_directories(pathTemp); - mapArgs["-datadir"] = pathTemp.string(); - bool fFirstRun; - auto pWallet = std::make_shared("wallet.dat"); - ASSERT_EQ(DB_LOAD_OK, pWallet->LoadWallet(fFirstRun)); - pWallet->TopUpKeyPool(); - std::cout << "Test wallet and logs saved in folder: " << pathTemp.native() << std::endl; - - int numKeys = 48; - std::vector pubkeys; - pubkeys.resize(3); - CPubKey newKey; - std::vector addresses; - for (int i = 0; i < numKeys; i++) { - ASSERT_TRUE(pWallet->GetKeyFromPool(newKey)); - pubkeys[0] = newKey; - pWallet->SetAddressBook(newKey.GetID(), "", "receive"); - - ASSERT_TRUE(pWallet->GetKeyFromPool(newKey)); - pubkeys[1] = newKey; - pWallet->SetAddressBook(newKey.GetID(), "", "receive"); - - ASSERT_TRUE(pWallet->GetKeyFromPool(newKey)); - pubkeys[2] = newKey; - pWallet->SetAddressBook(newKey.GetID(), "", "receive"); - - CScript result = GetScriptForMultisig(2, pubkeys); - ASSERT_FALSE(result.size() > MAX_SCRIPT_ELEMENT_SIZE); - CScriptID innerID(result); - pWallet->AddCScript(result); - pWallet->SetAddressBook(innerID, "", "receive"); - - std::string address = CBitcoinAddress(innerID).ToString(); - addresses.push_back(address); - } - - // Print out the addresses, 4 on each line. - std::string s = "vFoundersRewardAddress = {\n"; - int i=0; - int colsPerRow = 4; - ASSERT_TRUE(numKeys % colsPerRow == 0); - int numRows = numKeys/colsPerRow; - for (int row=0; rowFlush(true); - - ECC_Stop(); -} -#endif - - -// Utility method to check the number of unique addresses from height 1 to maxHeight -void checkNumberOfUniqueAddresses(int nUnique) { - int maxHeight = Params().GetConsensus().GetLastFoundersRewardBlockHeight(); - std::set addresses; - for (int i = 1; i <= maxHeight; i++) { - addresses.insert(Params().GetFoundersRewardAddressAtHeight(i)); - } - ASSERT_TRUE(addresses.size() == nUnique); -} - - -TEST(founders_reward_test, general) { - SelectParams(CBaseChainParams::TESTNET); - - CChainParams params = Params(); - - // Fourth testnet reward: - // address = t2ENg7hHVqqs9JwU5cgjvSbxnT2a9USNfhy - // script.ToString() = OP_HASH160 55d64928e69829d9376c776550b6cc710d427153 OP_EQUAL - // HexStr(script) = a91455d64928e69829d9376c776550b6cc710d42715387 - EXPECT_EQ(params.GetFoundersRewardScriptAtHeight(1), ParseHex("a914ef775f1f997f122a062fff1a2d7443abd1f9c64287")); - EXPECT_EQ(params.GetFoundersRewardAddressAtHeight(1), "t2UNzUUx8mWBCRYPRezvA363EYXyEpHokyi"); - EXPECT_EQ(params.GetFoundersRewardScriptAtHeight(53126), ParseHex("a914ac67f4c072668138d88a86ff21b27207b283212f87")); - EXPECT_EQ(params.GetFoundersRewardAddressAtHeight(53126), "t2NGQjYMQhFndDHguvUw4wZdNdsssA6K7x2"); - EXPECT_EQ(params.GetFoundersRewardScriptAtHeight(53127), ParseHex("a91455d64928e69829d9376c776550b6cc710d42715387")); - EXPECT_EQ(params.GetFoundersRewardAddressAtHeight(53127), "t2ENg7hHVqqs9JwU5cgjvSbxnT2a9USNfhy"); - - int maxHeight = params.GetConsensus().GetLastFoundersRewardBlockHeight(); - - // If the block height parameter is out of bounds, there is an assert. - EXPECT_DEATH(params.GetFoundersRewardScriptAtHeight(0), "nHeight"); - EXPECT_DEATH(params.GetFoundersRewardScriptAtHeight(maxHeight+1), "nHeight"); - EXPECT_DEATH(params.GetFoundersRewardAddressAtHeight(0), "nHeight"); - EXPECT_DEATH(params.GetFoundersRewardAddressAtHeight(maxHeight+1), "nHeight"); -} - - -#define NUM_MAINNET_FOUNDER_ADDRESSES 48 - -TEST(founders_reward_test, mainnet) { - SelectParams(CBaseChainParams::MAIN); - checkNumberOfUniqueAddresses(NUM_MAINNET_FOUNDER_ADDRESSES); -} - - -#define NUM_TESTNET_FOUNDER_ADDRESSES 48 - -TEST(founders_reward_test, testnet) { - SelectParams(CBaseChainParams::TESTNET); - checkNumberOfUniqueAddresses(NUM_TESTNET_FOUNDER_ADDRESSES); -} - - -#define NUM_REGTEST_FOUNDER_ADDRESSES 1 - -TEST(founders_reward_test, regtest) { - SelectParams(CBaseChainParams::REGTEST); - checkNumberOfUniqueAddresses(NUM_REGTEST_FOUNDER_ADDRESSES); -} - - - -// Test that 10% founders reward is fully rewarded after the first halving and slow start shift. -// On Mainnet, this would be 2,100,000 ZEC after 850,000 blocks (840,000 + 10,000). -TEST(founders_reward_test, slow_start_subsidy) { - SelectParams(CBaseChainParams::MAIN); - CChainParams params = Params(); - - int maxHeight = params.GetConsensus().GetLastFoundersRewardBlockHeight(); - CAmount totalSubsidy = 0; - for (int nHeight = 1; nHeight <= maxHeight; nHeight++) { - CAmount nSubsidy = GetBlockSubsidy(nHeight, params.GetConsensus()) / 5; - totalSubsidy += nSubsidy; - } - - ASSERT_TRUE(totalSubsidy == MAX_MONEY/10.0); -} - - -// For use with mainnet and testnet which each have 48 addresses. -// Verify the number of rewards each individual address receives. -void verifyNumberOfRewards() { - CChainParams params = Params(); - int maxHeight = params.GetConsensus().GetLastFoundersRewardBlockHeight(); - std::multiset ms; - for (int nHeight = 1; nHeight <= maxHeight; nHeight++) { - ms.insert(params.GetFoundersRewardAddressAtHeight(nHeight)); - } - - ASSERT_TRUE(ms.count(params.GetFoundersRewardAddressAtIndex(0)) == 17708); - for (int i = 1; i <= 46; i++) { - ASSERT_TRUE(ms.count(params.GetFoundersRewardAddressAtIndex(i)) == 17709); - } - ASSERT_TRUE(ms.count(params.GetFoundersRewardAddressAtIndex(47)) == 17677); -} - -// Verify the number of rewards going to each mainnet address -TEST(founders_reward_test, per_address_reward_mainnet) { - SelectParams(CBaseChainParams::MAIN); - verifyNumberOfRewards(); -} - -// Verify the number of rewards going to each testnet address -TEST(founders_reward_test, per_address_reward_testnet) { - SelectParams(CBaseChainParams::TESTNET); - verifyNumberOfRewards(); -} diff --git a/src/gtest/test_httprpc.cpp b/src/gtest/test_httprpc.cpp index c630973fb..c8d87bbcc 100644 --- a/src/gtest/test_httprpc.cpp +++ b/src/gtest/test_httprpc.cpp @@ -1,8 +1,8 @@ #include #include -#include "httprpc.cpp" -#include "httpserver.h" +#include +#include using ::testing::Return; diff --git a/src/gtest/test_joinsplit.cpp b/src/gtest/test_joinsplit.cpp index 979d0d518..4a9fc2f92 100644 --- a/src/gtest/test_joinsplit.cpp +++ b/src/gtest/test_joinsplit.cpp @@ -1,16 +1,16 @@ #include -#include "utilstrencodings.h" +#include #include -#include "zcash/prf.h" -#include "util.h" +#include +#include -#include "zcash/JoinSplit.hpp" -#include "zcash/Note.hpp" -#include "zcash/NoteEncryption.hpp" -#include "zcash/IncrementalMerkleTree.hpp" +#include +#include +#include +#include using namespace libzcash; diff --git a/src/gtest/test_keystore.cpp b/src/gtest/test_keystore.cpp index 76b57cd9f..55e51dd7c 100644 --- a/src/gtest/test_keystore.cpp +++ b/src/gtest/test_keystore.cpp @@ -1,11 +1,11 @@ #include -#include "keystore.h" -#include "random.h" +#include +#include #ifdef ENABLE_WALLET -#include "wallet/crypter.h" +#include #endif -#include "zcash/Address.hpp" +#include TEST(keystore_tests, store_and_retrieve_spending_key) { CBasicKeyStore keyStore; diff --git a/src/gtest/test_libzcash_utils.cpp b/src/gtest/test_libzcash_utils.cpp index ff84608bc..1dfc3c2ac 100644 --- a/src/gtest/test_libzcash_utils.cpp +++ b/src/gtest/test_libzcash_utils.cpp @@ -1,5 +1,5 @@ #include -#include "zcash/util.h" +#include TEST(libzcash_utils, convertBytesVectorToVector) { diff --git a/src/gtest/test_mempool.cpp b/src/gtest/test_mempool.cpp index 9256f196a..abd5594a7 100644 --- a/src/gtest/test_mempool.cpp +++ b/src/gtest/test_mempool.cpp @@ -1,14 +1,14 @@ #include #include -#include "consensus/upgrades.h" -#include "consensus/validation.h" -#include "core_io.h" -#include "main.h" -#include "primitives/transaction.h" -#include "txmempool.h" -#include "policy/fees.h" -#include "util.h" +#include +#include +#include +#include +#include +#include +#include +#include // Implementation is in test_checktransaction.cpp extern CMutableTransaction GetValidTransaction(); diff --git a/src/gtest/test_merkletree.cpp b/src/gtest/test_merkletree.cpp index d603b0aa6..0041b1f21 100644 --- a/src/gtest/test_merkletree.cpp +++ b/src/gtest/test_merkletree.cpp @@ -1,23 +1,23 @@ #include -#include "test/data/merkle_roots.json.h" -#include "test/data/merkle_roots_empty.json.h" -#include "test/data/merkle_serialization.json.h" -#include "test/data/merkle_witness_serialization.json.h" -#include "test/data/merkle_path.json.h" -#include "test/data/merkle_commitments.json.h" +#include +#include +#include +#include +#include +#include #include #include -#include "utilstrencodings.h" -#include "version.h" -#include "serialize.h" -#include "streams.h" +#include +#include +#include +#include -#include "zcash/IncrementalMerkleTree.hpp" -#include "zcash/util.h" +#include +#include #include #include @@ -26,7 +26,7 @@ #include -#include "json_test_vectors.h" +#include using namespace std; using namespace libsnark; diff --git a/src/gtest/test_metrics.cpp b/src/gtest/test_metrics.cpp index 143fe46d6..146655adc 100644 --- a/src/gtest/test_metrics.cpp +++ b/src/gtest/test_metrics.cpp @@ -1,7 +1,7 @@ #include -#include "metrics.h" -#include "utiltime.h" +#include +#include TEST(Metrics, AtomicTimer) { diff --git a/src/gtest/test_miner.cpp b/src/gtest/test_miner.cpp index c232af842..6c0ab2ca1 100644 --- a/src/gtest/test_miner.cpp +++ b/src/gtest/test_miner.cpp @@ -1,12 +1,12 @@ #include #include -#include "chainparams.h" -#include "key.h" -#include "miner.h" -#include "util.h" +#include +#include +#include +#include #ifdef ENABLE_WALLET -#include "wallet/wallet.h" +#include #endif #include diff --git a/src/gtest/test_noteencryption.cpp b/src/gtest/test_noteencryption.cpp index f521cdb01..ef61445a0 100644 --- a/src/gtest/test_noteencryption.cpp +++ b/src/gtest/test_noteencryption.cpp @@ -1,11 +1,11 @@ #include -#include "sodium.h" +#include #include -#include "zcash/NoteEncryption.hpp" -#include "zcash/prf.h" -#include "crypto/sha256.h" +#include +#include +#include class TestNoteDecryption : public ZCNoteDecryption { public: diff --git a/src/gtest/test_paymentdisclosure.cpp b/src/gtest/test_paymentdisclosure.cpp index ddab3c7e6..b2ec58ec9 100644 --- a/src/gtest/test_paymentdisclosure.cpp +++ b/src/gtest/test_paymentdisclosure.cpp @@ -1,24 +1,24 @@ #include -#include "main.h" -#include "utilmoneystr.h" -#include "chainparams.h" -#include "utilstrencodings.h" -#include "zcash/Address.hpp" -#include "wallet/wallet.h" -#include "amount.h" +#include +#include +#include +#include +#include +#include +#include #include #include #include #include #include #include -#include "util.h" +#include -#include "paymentdisclosure.h" -#include "paymentdisclosuredb.h" +#include +#include -#include "sodium.h" +#include #include #include diff --git a/src/gtest/test_pow.cpp b/src/gtest/test_pow.cpp index ac3ce59e1..53844093c 100644 --- a/src/gtest/test_pow.cpp +++ b/src/gtest/test_pow.cpp @@ -1,9 +1,9 @@ #include -#include "chain.h" -#include "chainparams.h" -#include "pow.h" -#include "random.h" +#include +#include +#include +#include TEST(PoW, DifficultyAveraging) { SelectParams(CBaseChainParams::MAIN); diff --git a/src/gtest/test_proofs.cpp b/src/gtest/test_proofs.cpp index e33b1cc0c..98929435e 100644 --- a/src/gtest/test_proofs.cpp +++ b/src/gtest/test_proofs.cpp @@ -1,5 +1,5 @@ #include -#include "zcash/Proof.hpp" +#include #include @@ -17,9 +17,9 @@ typedef libsnark::default_r1cs_ppzksnark_pp::Fp_type curve_Fr; typedef libsnark::default_r1cs_ppzksnark_pp::Fq_type curve_Fq; typedef libsnark::default_r1cs_ppzksnark_pp::Fqe_type curve_Fq2; -#include "streams.h" -#include "version.h" -#include "utilstrencodings.h" +#include +#include +#include TEST(proofs, g1_pairing_at_infinity) { @@ -668,8 +668,8 @@ TEST(proofs, g2_deserialization) } } -#include "json_test_vectors.h" -#include "test/data/g1_compressed.json.h" +#include +#include TEST(proofs, g1_test_vectors) { @@ -685,7 +685,7 @@ TEST(proofs, g1_test_vectors) } } -#include "test/data/g2_compressed.json.h" +#include TEST(proofs, g2_test_vectors) { diff --git a/src/gtest/test_random.cpp b/src/gtest/test_random.cpp index d89702bcd..26866f514 100644 --- a/src/gtest/test_random.cpp +++ b/src/gtest/test_random.cpp @@ -1,6 +1,6 @@ #include -#include "random.h" +#include extern int GenZero(int n); extern int GenMax(int n); diff --git a/src/gtest/test_rpc.cpp b/src/gtest/test_rpc.cpp index a3fc201cd..1705b0677 100644 --- a/src/gtest/test_rpc.cpp +++ b/src/gtest/test_rpc.cpp @@ -1,13 +1,13 @@ #include #include -#include "chain.h" -#include "chainparams.h" -#include "clientversion.h" -#include "primitives/block.h" -#include "rpcserver.h" -#include "streams.h" -#include "utilstrencodings.h" +#include +#include +#include +#include +#include +#include +#include extern UniValue blockToJSON(const CBlock& block, const CBlockIndex* blockindex, bool txDetails = false); diff --git a/src/gtest/test_transaction.cpp b/src/gtest/test_transaction.cpp index fb68fd35c..78b4cdb11 100644 --- a/src/gtest/test_transaction.cpp +++ b/src/gtest/test_transaction.cpp @@ -1,8 +1,8 @@ #include -#include "primitives/transaction.h" -#include "zcash/Note.hpp" -#include "zcash/Address.hpp" +#include +#include +#include extern ZCJoinSplit* params; extern int GenZero(int n); diff --git a/src/gtest/test_txid.cpp b/src/gtest/test_txid.cpp index 9b4a21068..369179178 100644 --- a/src/gtest/test_txid.cpp +++ b/src/gtest/test_txid.cpp @@ -1,11 +1,11 @@ #include -#include "primitives/transaction.h" -#include "clientversion.h" -#include "serialize.h" -#include "streams.h" -#include "uint256.h" -#include "util.h" -#include "utilstrencodings.h" +#include +#include +#include +#include +#include +#include +#include /* Test that removing #1144 succeeded by verifying the hash of a transaction is over the entire serialized form. diff --git a/src/gtest/test_upgrades.cpp b/src/gtest/test_upgrades.cpp index 1066a28d0..746d67524 100644 --- a/src/gtest/test_upgrades.cpp +++ b/src/gtest/test_upgrades.cpp @@ -1,7 +1,7 @@ #include -#include "chainparams.h" -#include "consensus/upgrades.h" +#include +#include #include diff --git a/src/gtest/test_validation.cpp b/src/gtest/test_validation.cpp index db382e96b..82a3c3ac2 100644 --- a/src/gtest/test_validation.cpp +++ b/src/gtest/test_validation.cpp @@ -1,9 +1,9 @@ #include -#include "consensus/upgrades.h" -#include "consensus/validation.h" -#include "main.h" -#include "utiltest.h" +#include +#include +#include +#include extern ZCJoinSplit* params; diff --git a/src/paymentdisclosure.cpp b/src/paymentdisclosure.cpp index 0b1bd0079..82f87afd3 100644 --- a/src/paymentdisclosure.cpp +++ b/src/paymentdisclosure.cpp @@ -2,8 +2,8 @@ // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. -#include "paymentdisclosure.h" -#include "util.h" +#include +#include std::string PaymentDisclosureInfo::ToString() const { return strprintf("PaymentDisclosureInfo(version=%d, esk=%s, joinSplitPrivKey=, address=%s)", diff --git a/src/paymentdisclosure.h b/src/paymentdisclosure.h index 2ac4c6138..b81bd1ce1 100644 --- a/src/paymentdisclosure.h +++ b/src/paymentdisclosure.h @@ -5,15 +5,15 @@ #ifndef ZCASH_PAYMENTDISCLOSURE_H #define ZCASH_PAYMENTDISCLOSURE_H -#include "uint256.h" -#include "clientversion.h" -#include "serialize.h" -#include "streams.h" -#include "version.h" +#include +#include +#include +#include +#include // For JSOutPoint #include -#include "wallet/wallet.h" +#include #include #include @@ -114,11 +114,11 @@ struct PaymentDisclosurePayload { struct PaymentDisclosure { PaymentDisclosurePayload payload; - boost::array payloadSig; + std::array payloadSig; // We use boost array because serialize doesn't like char buffer, otherwise we could do: unsigned char payloadSig[64]; PaymentDisclosure() {}; - PaymentDisclosure(const PaymentDisclosurePayload payload, const boost::array sig) : payload(payload), payloadSig(sig) {}; + PaymentDisclosure(const PaymentDisclosurePayload payload, const std::array sig) : payload(payload), payloadSig(sig) {}; PaymentDisclosure(const uint256& joinSplitPubKey, const PaymentDisclosureKey& key, const PaymentDisclosureInfo& info, const std::string& message); ADD_SERIALIZE_METHODS; diff --git a/src/paymentdisclosuredb.h b/src/paymentdisclosuredb.h index 9352cac8f..ab26b9730 100644 --- a/src/paymentdisclosuredb.h +++ b/src/paymentdisclosuredb.h @@ -5,7 +5,7 @@ #ifndef ZCASH_PAYMENTDISCLOSUREDB_H #define ZCASH_PAYMENTDISCLOSUREDB_H -#include "paymentdisclosure.h" +#include #include #include diff --git a/src/primitives/joinsplit.h b/src/primitives/joinsplit.h index 1e6f4f65b..12cd2e16a 100644 --- a/src/primitives/joinsplit.h +++ b/src/primitives/joinsplit.h @@ -7,17 +7,17 @@ #ifndef BTCP_PRIMITIVES_JOINSPLIT_H #define BTCP_PRIMITIVES_JOINSPLIT_H -#include "amount.h" -#include "random.h" -#include "script/script.h" -#include "serialize.h" -#include "uint256.h" -#include "consensus/consensus.h" +#include +#include +#include