Skip to content

Commit

Permalink
Merge pull request #350 from eosnetworkfoundation/cc_bump_snapshots_t…
Browse files Browse the repository at this point in the history
…o_v6

Bump snapshot version to v6
  • Loading branch information
ClaytonCalabrese authored Jun 8, 2022
2 parents d36cebd + aa28ece commit 4ef2e72
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion libraries/chain/include/eosio/chain/chain_snapshot.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@ struct chain_snapshot_header {
* - Configurable wasm limits
* 5: Updated for v3.0.0 eos features:
* - chain_config update
* 6: Updated for v3.1.0 eos mandel release
*/

static constexpr uint32_t minimum_compatible_version = 2;
static constexpr uint32_t current_version = 5;
static constexpr uint32_t current_version = 6;

uint32_t version = current_version;

Expand Down
4 changes: 2 additions & 2 deletions unittests/snapshot_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@ BOOST_AUTO_TEST_CASE_TEMPLATE(test_compatible_versions, SNAPSHOT_SUITE, snapshot
bfs::copy(source_log_dir / "blocks.log", config.blocks_dir / "blocks.log");
tester base_chain(config, *genesis);

std::string current_version = "v5";
std::string current_version = "v6";

int ordinal = 0;
for(std::string version : {"v2", "v3", "v4" , "v5"})
for(std::string version : {"v2", "v3", "v4" , "v5", "v6"})
{
if(save_snapshot && version == current_version) continue;
static_assert(chain_snapshot_header::minimum_compatible_version <= 2, "version 2 unit test is no longer needed. Please clean up data files");
Expand Down
2 changes: 2 additions & 0 deletions unittests/snapshots/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/snap_v4.bin.gz ${CMAKE_CURRENT_BINAR
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/snap_v4.json.gz ${CMAKE_CURRENT_BINARY_DIR}/snap_v4.json.gz COPYONLY )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/snap_v5.bin.gz ${CMAKE_CURRENT_BINARY_DIR}/snap_v5.bin.gz COPYONLY )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/snap_v5.json.gz ${CMAKE_CURRENT_BINARY_DIR}/snap_v5.json.gz COPYONLY )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/snap_v6.bin.gz ${CMAKE_CURRENT_BINARY_DIR}/snap_v6.bin.gz COPYONLY )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/snap_v6.json.gz ${CMAKE_CURRENT_BINARY_DIR}/snap_v6.json.gz COPYONLY )
Binary file added unittests/snapshots/snap_v6.bin.gz
Binary file not shown.
Binary file added unittests/snapshots/snap_v6.json.gz
Binary file not shown.

0 comments on commit 4ef2e72

Please sign in to comment.