2013-11-19 15:54:31 +05:30
|
|
|
#include "era/era_detail.h"
|
|
|
|
|
|
|
|
#include <stdexcept>
|
|
|
|
|
|
|
|
using namespace base;
|
|
|
|
using namespace era;
|
|
|
|
|
|
|
|
//----------------------------------------------------------------
|
|
|
|
|
|
|
|
void
|
|
|
|
era_detail_traits::unpack(disk_type const &disk, value_type &value)
|
|
|
|
{
|
|
|
|
value.nr_bits = to_cpu<uint32_t>(disk.nr_bits);
|
2014-01-30 03:07:25 +05:30
|
|
|
value.writeset_root = to_cpu<uint64_t>(disk.writeset_root);
|
2013-11-19 15:54:31 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
era_detail_traits::pack(value_type const &value, disk_type &disk)
|
|
|
|
{
|
|
|
|
disk.nr_bits = to_disk<le32>(value.nr_bits);
|
2014-01-30 03:07:25 +05:30
|
|
|
disk.writeset_root = to_disk<le64>(value.writeset_root);
|
2013-11-19 15:54:31 +05:30
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------
|