提交 78301c69 编写于 作者: D Daniel Larimer 提交者: GitHub

Merge pull request #65 from pmesnier/master

Adding more p2p functionality, including enhancing the synchronizatio…
......@@ -18,7 +18,8 @@ namespace eos {
void plugin_startup();
void plugin_shutdown();
void broadcast_block(const chain::signed_block &sb);
void broadcast_block(const chain::signed_block &sb);
void broadcast_transaction (const chain::SignedTransaction &txn);
private:
std::unique_ptr<class net_plugin_impl> my;
......
......@@ -12,6 +12,8 @@ namespace eos {
fc::sha256 node_id; ///< used to identify peers and prevent self-connect
uint32_t last_irreversible_block_num = 0;
block_id_type last_irreversible_block_id;
uint32_t head_num = 0;
block_id_type head_id;
string os;
string agent;
};
......@@ -32,7 +34,7 @@ namespace eos {
};
struct peer_message {
vector<fc::ip::endpoint> peers;
vector<fc::ip::endpoint> peers;
};
using net_message = static_variant<handshake_message,
......@@ -48,7 +50,8 @@ namespace eos {
FC_REFLECT( eos::handshake_message,
(network_version)(chain_id)(node_id)
(last_irreversible_block_num)(last_irreversible_block_num)
(last_irreversible_block_num)(last_irreversible_block_id)
(head_num)(head_id)
(os)(agent) )
FC_REFLECT( eos::block_summary_message, (block)(trx_ids) )
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册