Skip to content

Commit

Permalink
Merge pull request #681 from GolosChain/649-ee-done-event
Browse files Browse the repository at this point in the history
GenesisEndMessage #649
  • Loading branch information
afalaleev committed May 17, 2019
2 parents ae5f219 + 90bdb22 commit 5039f3f
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
3 changes: 2 additions & 1 deletion libraries/chain/genesis/genesis_import.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ struct genesis_import::impl final {
}

storage_payer_info ram_payer_info(const sys_table_row& row) {
return resource_mng.get_storage_payer(row.ram_payer);
// TODO: Fix better. I am not yet fully investigated storage paying, it just fixes build
return resource_mng.get_storage_payer(0, row.ram_payer);
};

void import_state() {
Expand Down
1 change: 1 addition & 0 deletions plugins/event_engine_plugin/event_engine_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -362,6 +362,7 @@ void event_engine_plugin::plugin_startup() {
for(const auto& file: my->genesis_files) {
my->send_genesis_file(file);
}
my->send_message(GenesisEndMessage(BaseMessage::GenesisEnd));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ namespace eosio {
ApplyTrx,

GenesisData,
GenesisEnd,
};

MsgType msg_type;
Expand All @@ -87,6 +88,13 @@ namespace eosio {
{}
};

struct GenesisEndMessage : public BaseMessage {

GenesisEndMessage(BaseMessage::MsgType msg_type)
: BaseMessage(msg_type)
{}
};

struct AcceptTrxMessage : public BaseMessage, TrxMetadata {
AcceptTrxMessage(BaseMessage::MsgType msg_type, const chain::transaction_metadata_ptr &trx_meta)
: BaseMessage(msg_type)
Expand Down Expand Up @@ -160,9 +168,10 @@ FC_REFLECT(eosio::ActionData, (receiver)(code)(action)(data)(args)(events))
FC_REFLECT(eosio::TrxMetadata, (id)(accepted)(implicit)(scheduled))
FC_REFLECT(eosio::TrxReceipt, (id)(status)(cpu_usage_us)(net_usage_words))

FC_REFLECT_ENUM(eosio::BaseMessage::MsgType, (Unknown)(GenesisData)(AcceptBlock)(CommitBlock)(AcceptTrx)(ApplyTrx))
FC_REFLECT_ENUM(eosio::BaseMessage::MsgType, (Unknown)(GenesisData)(GenesisEnd)(AcceptBlock)(CommitBlock)(AcceptTrx)(ApplyTrx))
FC_REFLECT(eosio::BaseMessage, (msg_type))
FC_REFLECT_DERIVED(eosio::GenesisDataMessage, (eosio::BaseMessage), (code)(name)(data))
FC_REFLECT_DERIVED(eosio::GenesisEndMessage, (eosio::BaseMessage), )
FC_REFLECT_DERIVED(eosio::BlockMessage, (eosio::BaseMessage), (id)(block_num)(block_time)(validated)(in_current_chain))
FC_REFLECT_DERIVED(eosio::AcceptedBlockMessage, (eosio::BlockMessage), (trxs)(events))
FC_REFLECT_DERIVED(eosio::AcceptTrxMessage, (eosio::BaseMessage)(eosio::TrxMetadata), )
Expand Down

0 comments on commit 5039f3f

Please sign in to comment.