Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
chain_snapshot.hpp
Go to the documentation of this file.
1#pragma once
2
4
5namespace sysio { namespace chain {
6
29 static constexpr uint32_t current_version = 6;
30
32
33 void validate() const {
35 auto max = current_version;
36 SYS_ASSERT(version >= min && version <= max,
37 snapshot_validation_exception,
38 "Unsupported version of chain snapshot: ${version}. Supported version must be between ${min} and ${max} inclusive.",
39 ("version",version)("min",min)("max",max));
40 }
41};
42
43} }
44
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
Definition exceptions.hpp:7
const T & min(const T &a, const T &b)
Definition utility.hpp:140
#define FC_REFLECT(TYPE, MEMBERS)
Specializes fc::reflector for TYPE.
Definition reflect.hpp:311
unsigned int uint32_t
Definition stdint.h:126
static constexpr uint32_t minimum_compatible_version
static constexpr uint32_t current_version