| 18 | // compact block relay. |
| 19 | |
| 20 | static void DeserializeBlockTest(benchmark::State& state) |
| 21 | { |
| 22 | CDataStream stream((const char*)block_bench::block413567, |
| 23 | (const char*)&block_bench::block413567[sizeof(block_bench::block413567)], |
| 24 | SER_NETWORK, PROTOCOL_VERSION | SERIALIZE_BLOCK_LEGACY); |
| 25 | char a = '\0'; |
| 26 | stream.write(&a, 1); // Prevent compaction |
| 27 | |
| 28 | while (state.KeepRunning()) { |
| 29 | CBlock block; |
| 30 | stream >> block; |
| 31 | assert(stream.Rewind(sizeof(block_bench::block413567))); |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | static void DeserializeAndCheckBlockTest(benchmark::State& state) |
| 36 | { |
nothing calls this directly
no test coverage detected