diff --git a/src/bench/checkblock.cpp b/src/bench/checkblock.cpp index 0cdfe03ac..c18e6521a 100644 --- a/src/bench/checkblock.cpp +++ b/src/bench/checkblock.cpp @@ -1,63 +1,63 @@ // Copyright (c) 2016 The Bitcoin Core developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include #include #include #include #include #include namespace block_bench { #include } // namespace block_bench // These are the two major time-sinks which happen after we have fully received // a block off the wire, but before we can relay the block on to peers using // compact block relay. static void DeserializeBlockTest(benchmark::State &state) { CDataStream stream((const char *)block_bench::block413567, - (const char *)&block_bench::block413567[sizeof( - block_bench::block413567)], + (const char *)block_bench::block413567 + + sizeof(block_bench::block413567), SER_NETWORK, PROTOCOL_VERSION); char a = '\0'; stream.write(&a, 1); // Prevent compaction while (state.KeepRunning()) { CBlock block; stream >> block; bool rewound = stream.Rewind(sizeof(block_bench::block413567)); assert(rewound); } } static void DeserializeAndCheckBlockTest(benchmark::State &state) { CDataStream stream((const char *)block_bench::block413567, - (const char *)&block_bench::block413567[sizeof( - block_bench::block413567)], + (const char *)block_bench::block413567 + + sizeof(block_bench::block413567), SER_NETWORK, PROTOCOL_VERSION); char a = '\0'; stream.write(&a, 1); // Prevent compaction const Config &config = GetConfig(); const Consensus::Params params = config.GetChainParams().GetConsensus(); BlockValidationOptions options(config); while (state.KeepRunning()) { // Note that CBlock caches its checked state, so we need to recreate it // here. CBlock block; stream >> block; bool rewound = stream.Rewind(sizeof(block_bench::block413567)); assert(rewound); CValidationState validationState; bool checked = CheckBlock(block, validationState, params, options); assert(checked); } } BENCHMARK(DeserializeBlockTest, 130); BENCHMARK(DeserializeAndCheckBlockTest, 160); diff --git a/src/test/script_tests.cpp b/src/test/script_tests.cpp index ece57b443..af6153c71 100644 --- a/src/test/script_tests.cpp +++ b/src/test/script_tests.cpp @@ -1,3263 +1,3263 @@ // Copyright (c) 2011-2016 The Bitcoin Core developers // Copyright (c) 2017-2020 The Bitcoin developers // Distributed under the MIT software license, see the accompanying // file COPYING or http://www.opensource.org/licenses/mit-license.php. #include