提交 fdc44be2 编写于 作者: M Matt Witherspoon

Revert "Renable building of net_plugin"

This reverts commit eddf91d4. To make merging from master to noon easier.
上级 c199040a
add_subdirectory(net_plugin)
#add_subdirectory(net_plugin)
#add_subdirectory(p2p_plugin)
add_subdirectory(http_plugin)
add_subdirectory(chain_plugin)
......
......@@ -4,7 +4,7 @@
*/
#pragma once
#include <appbase/application.hpp>
#include <eosio/chain_plugin/chain_plugin.hpp>
#include <eos/chain_plugin/chain_plugin.hpp>
namespace eosio {
using namespace appbase;
......
......@@ -104,7 +104,6 @@ namespace eosio {
ordered_blk_ids req_blocks;
};
#if 0
struct processed_trans_summary {
transaction_id_type id;
vector<message_output> outmsgs;
......@@ -114,13 +113,11 @@ namespace eosio {
vector<transaction_id_type> gen_trx; // is this necessary to send?
vector<processed_trans_summary> user_trx;
};
using cycle_ids = vector<thread_ids>;
#endif
struct block_summary_message {
signed_block_header block_header;
#if 0
vector<cycle_ids> trx_ids;
#endif
};
struct sync_request_message {
......@@ -149,11 +146,9 @@ FC_REFLECT( eosio::handshake_message,
(os)(agent)(generation) )
FC_REFLECT( eosio::go_away_message, (reason)(node_id) )
FC_REFLECT( eosio::time_message, (org)(rec)(xmt)(dst) )
#if 0
FC_REFLECT( eosio::processed_trans_summary, (id)(outmsgs) )
FC_REFLECT( eosio::thread_ids, (gen_trx)(user_trx) )
#endif
FC_REFLECT( eosio::block_summary_message, (block_header)/*(trx_ids)*/ )
FC_REFLECT( eosio::block_summary_message, (block_header)(trx_ids) )
FC_REFLECT( eosio::notice_message, (known_trx)(known_blocks) )
FC_REFLECT( eosio::request_message, (req_trx)(req_blocks) )
FC_REFLECT( eosio::sync_request_message, (start_block)(end_block) )
......
......@@ -23,8 +23,6 @@
#include <boost/asio/steady_timer.hpp>
#include <boost/intrusive/set.hpp>
#include <eosio/chain/contracts/types.hpp>
namespace eosio {
using std::vector;
......@@ -38,8 +36,6 @@ namespace eosio {
using eosio::chain::transaction_id_type;
namespace bip = boost::interprocess;
using chain::contracts::uint16;
class connection;
class sync_manager;
......@@ -1538,7 +1534,6 @@ namespace eosio {
}
void net_plugin_impl::handle_message( connection_ptr c, const block_summary_message &msg) {
#if 0
fc_dlog(logger, "got a block_summary_message from ${p}", ("p",c->peer_name()));
fc_dlog(logger, "bsm header = ${h}",("h",msg.block_header));
fc_dlog(logger, "txn count = ${c}", ("c",msg.trx_ids.size()));
......@@ -1565,8 +1560,8 @@ namespace eosio {
if( !cc.is_known_block(msg.block_header.id()) ) {
sb.previous = msg.block_header.previous;
sb.timestamp = msg.block_header.timestamp;
sb.transaction_mroot = msg.block_header.transaction_mroot;
sb.new_producers = msg.block_header.new_producers;
sb.transaction_merkle_root = msg.block_header.transaction_merkle_root;
sb.producer_changes = msg.block_header.producer_changes;
sb.producer = msg.block_header.producer;
sb.producer_signature = msg.block_header.producer_signature;
......@@ -1575,15 +1570,15 @@ namespace eosio {
if( cyc.size() == 0 ) {
continue;
}
sb.cycles_summary.emplace_back( eosio::chain::cycle( ) );
eosio::chain::cycle &sbcycle = sb.cycles_summary.back( );
sb.cycles.emplace_back( eosio::chain::cycle( ) );
eosio::chain::cycle &sbcycle = sb.cycles.back( );
for( auto &cyc_thr_id : cyc ) {
fc_dlog(logger, "cycle user theads count = ${c}", ("c",cyc_thr_id.user_trx.size()));
if (cyc_thr_id.user_trx.size() == 0) {
continue;
}
sbcycle.emplace_back( eosio::chain::shard( ) );
eosio::chain::shard &cyc_thr = sbcycle.back();
sbcycle.emplace_back( eosio::chain::thread( ) );
eosio::chain::thread &cyc_thr = sbcycle.back();
/*
for( auto &gt : cyc_thr_id.gen_trx ) {
try {
......@@ -1601,10 +1596,22 @@ namespace eosio {
}
*/
for( auto &ut : cyc_thr_id.user_trx ) {
if(cc.is_known_transaction(ut.id) == false) {
elog( "unable to retieve user transaction" );
fetch_error = true;
break;
// auto ltxn = local_txns.get<by_id>().find(ut);
try {
processed_transaction pt(cc.get_recent_transaction(ut.id));
pt.output = ut.outmsgs;
cyc_thr.user_input.emplace_back(pt);
fc_dlog(logger, "Found the transaction");
} catch ( const exception &ex) {
fetch_error = true;
elog( "unable to retieve user transaction, caught {ex}", ("ex",ex) );
break;
} catch ( ... ) {
fetch_error = true;
elog( "unable to retieve user transaction" );
break;
}
}
if( fetch_error ){
......@@ -1631,7 +1638,6 @@ namespace eosio {
elog( "unable to accept block, reason unknown" );
}
}
#endif
}
void net_plugin_impl::handle_message( connection_ptr c, const signed_transaction &msg) {
......@@ -1947,11 +1953,11 @@ namespace eosio {
send_all( sb,[](connection_ptr c) -> bool { return true; });
return;
}
#if 0
block_summary_message bsm = {sb, vector<cycle_ids>()};
vector<cycle_ids> &trxs = bsm.trx_ids;
if( !sb.cycles_summary.empty()) {
for( const auto& cyc : sb.cycles_summary) {
if( !sb.cycles.empty()) {
for( const auto& cyc : sb.cycles) {
fc_dlog(logger, "cyc.size = ${cs}",( "cs", cyc.size()));
if( cyc.empty() ) {
continue;
......@@ -1959,7 +1965,7 @@ namespace eosio {
trxs.emplace_back (cycle_ids());
cycle_ids &cycs = trxs.back();
fc_dlog(logger, "trxs.size = ${ts} cycles.size = ${cs}",("ts", trxs.size())("cs", cycs.size()));
for( const shard& shrd : cyc) {
for( const auto& thr : cyc) {
fc_dlog(logger, "user txns = ${ui} generated = ${gi}",("ui",thr.user_input.size( ))("gi",thr.generated_input.size( )));
if( thr.user_input.size( ) == 0 ) {
continue;
......@@ -1995,7 +2001,6 @@ namespace eosio {
}
return false;
});
#endif
}
void
......@@ -2055,9 +2060,7 @@ namespace eosio {
( "remote-endpoint", bpo::value< vector<string> >()->composing(), "The IP address and port of a remote peer to sync with.")
( "public-endpoint", bpo::value<string>(), "Overrides the advertised listen endpointlisten ip address.")
( "agent-name", bpo::value<string>()->default_value("EOS Test Agent"), "The name supplied to identify this node amongst the peers.")
#if 0
( "send-whole-blocks", bpo::value<bool>()->default_value(def_send_whole_blocks), "True to always send full blocks, false to send block summaries" )
#endif
( "send-whole-blocks", bpo::value<bool>()->default_value(def_send_whole_blocks), "True to always send full blocks, false to send block summaries" )
( "log-level-net-plugin", bpo::value<string>()->default_value("info"), "Log level: one of 'all', 'debug', 'info', 'warn', 'error', or 'off'")
;
}
......
......@@ -33,7 +33,7 @@ target_link_libraries( eosiod
# PRIVATE account_history_api_plugin account_history_plugin db_plugin
PRIVATE chain_api_plugin producer_plugin chain_plugin
PRIVATE wallet_api_plugin
PRIVATE net_plugin
# PRIVATE net_plugin
PRIVATE http_plugin
PRIVATE eosio_chain fc ${CMAKE_DL_LIBS} ${PLATFORM_SPECIFIC_LIBS} )
......
......@@ -8,7 +8,7 @@
#include <eosio/chain_plugin/chain_plugin.hpp>
#include <eosio/http_plugin/http_plugin.hpp>
#include <eosio/chain_api_plugin/chain_api_plugin.hpp>
#include <eos/net_plugin/net_plugin.hpp>
//#include <eosio/net_plugin/net_plugin.hpp>
//#include <eosio/account_history_plugin/account_history_plugin.hpp>
//#include <eosio/account_history_api_plugin/account_history_api_plugin.hpp>
#include <eosio/wallet_api_plugin/wallet_api_plugin.hpp>
......@@ -32,7 +32,6 @@ int main(int argc, char** argv)
app().register_plugin<producer_plugin>();
// app().register_plugin<account_history_api_plugin>();
app().register_plugin<wallet_api_plugin>();
app().register_plugin<net_plugin>();
if(!app().initialize<chain_plugin, http_plugin>(argc, argv))
return -1;
app().startup();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册