Wire Sysio
Wire Sysion 1.0.0
Loading...
Searching...
No Matches
genesis_state.cpp
Go to the documentation of this file.
1
#include <
sysio/chain/genesis_state.hpp
>
2
3
// these are required to serialize a genesis_state
4
5
namespace
sysio
{
namespace
chain {
6
7
genesis_state::genesis_state
() {
8
initial_timestamp
=
fc::time_point::from_iso_string
(
"2018-06-01T12:00:00"
);
9
initial_key
=
fc::variant
(
sysio_root_key
).
as
<
public_key_type
>();
10
}
11
12
chain::chain_id_type
genesis_state::compute_chain_id
()
const
{
13
digest_type::encoder
enc;
14
fc::raw::pack
( enc, *
this
);
15
return
chain_id_type
{enc.
result
()};
16
}
17
18
} }
// namespace sysio::chain
fc::crypto::public_key
Definition
public_key.hpp:24
fc::sha256::encoder
Definition
sha256.hpp:38
fc::sha256::encoder::result
sha256 result()
Definition
sha256.cpp:62
fc::time_point::from_iso_string
static time_point from_iso_string(const fc::string &s)
Definition
time.cpp:67
fc::variant
stores null, int64, uint64, double, bool, string, std::vector<variant>, and variant_object's.
Definition
variant.hpp:191
fc::variant::as
T as() const
Definition
variant.hpp:327
genesis_state.hpp
fc::raw::pack
void pack(Stream &s, const std::deque< T > &value)
Definition
raw.hpp:531
sysio
Definition
abi_serializer.cpp:8
sysio::chain::chain_id_type
Definition
chain_id_type.hpp:23
sysio::chain::genesis_state::sysio_root_key
static const string sysio_root_key
Definition
genesis_state.hpp:17
sysio::chain::genesis_state::initial_key
public_key_type initial_key
Definition
genesis_state.hpp:56
sysio::chain::genesis_state::initial_timestamp
time_point initial_timestamp
Definition
genesis_state.hpp:55
sysio::chain::genesis_state::compute_chain_id
chain_id_type compute_chain_id() const
Definition
genesis_state.cpp:12
sysio::chain::genesis_state::genesis_state
genesis_state()
Definition
genesis_state.cpp:7
libraries
chain
genesis_state.cpp
Generated by
1.12.0