提交 71f667f6 编写于 作者: K Kevin Heifner

Do not process incoming transactions in read-only mode

上级 4a4accb0
......@@ -1038,6 +1038,8 @@ namespace eosio {
peer_elog(this, "bad packed_transaction_ptr : null pointer");
EOS_THROW(transaction_exception, "bad transaction");
}
if( app().get_plugin<chain_plugin>().chain().get_read_mode() == chain::db_read_mode::READ_ONLY )
return;
auto id = p->id();
// ilog( "recv trx ${n}", ("n", id) );
......@@ -1368,6 +1370,11 @@ namespace eosio {
});
if( app().get_plugin<chain_plugin>().chain().get_read_mode() == chain::db_read_mode::READ_ONLY ) {
my->_request_trx = false;
ilog( "setting bnet-no-trx to true since in read-only mode" );
}
const auto address = boost::asio::ip::make_address( my->_bnet_endpoint_address );
my->_ioc.reset( new boost::asio::io_context{my->_num_threads} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册