diff --git a/contracts/enumivolib/privileged.h b/contracts/enumivolib/privileged.h index bffdbf00c91..b18dd08cb4b 100644 --- a/contracts/enumivolib/privileged.h +++ b/contracts/enumivolib/privileged.h @@ -26,7 +26,7 @@ extern "C" { void set_privileged( account_name account, bool is_priv ); - void set_blockchain_parameters_packed(char* data, uint32_t datalen); + void set_blockchain_parameters_packed(char* data, uint32_t datalen); /** * Retrieve the blolckchain parameters diff --git a/plugins/net_plugin/net_plugin.cpp b/plugins/net_plugin/net_plugin.cpp index da5de63c02f..008a57c2315 100644 --- a/plugins/net_plugin/net_plugin.cpp +++ b/plugins/net_plugin/net_plugin.cpp @@ -453,20 +453,19 @@ namespace eosio { }; deque write_queue; deque out_queue; - fc::sha256 node_id; handshake_message last_handshake_recv; handshake_message last_handshake_sent; - int16_t sent_handshake_count; - bool connecting; - bool syncing; - uint16_t protocol_version; + int16_t sent_handshake_count = 0; + bool connecting = false; + bool syncing = false; + uint16_t protocol_version = 0; string peer_addr; unique_ptr response_expected; optional pending_fetch; - go_away_reason no_retry; + go_away_reason no_retry = no_reason; block_id_type fork_head; - uint32_t fork_head_num; + uint32_t fork_head_num = 0; optional last_req; connection_status get_status()const { @@ -947,12 +946,12 @@ namespace eosio { bool trigger_send, std::function callback) { write_queue.push_back({buff, callback}); - if(write_queue.size() == 1 && trigger_send) + if(out_queue.empty() && trigger_send) do_queue_write(); } void connection::do_queue_write() { - if(write_queue.empty()) + if(write_queue.empty() || !out_queue.empty()) return; connection_wptr c(shared_from_this()); if(!socket->is_open()) {