Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
fdc44be2
Y
YTBP
项目概览
YottaChain
/
YTBP
通知
0
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
YTBP
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fdc44be2
编写于
12月 07, 2017
作者:
M
Matt Witherspoon
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Revert "Renable building of net_plugin"
This reverts commit
eddf91d4
. To make merging from master to noon easier.
上级
c199040a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
33 addition
and
36 deletion
+33
-36
plugins/CMakeLists.txt
plugins/CMakeLists.txt
+1
-1
plugins/net_plugin/include/eos/net_plugin/net_plugin.hpp
plugins/net_plugin/include/eos/net_plugin/net_plugin.hpp
+1
-1
plugins/net_plugin/include/eos/net_plugin/protocol.hpp
plugins/net_plugin/include/eos/net_plugin/protocol.hpp
+2
-7
plugins/net_plugin/net_plugin.cpp
plugins/net_plugin/net_plugin.cpp
+27
-24
programs/eosiod/CMakeLists.txt
programs/eosiod/CMakeLists.txt
+1
-1
programs/eosiod/main.cpp
programs/eosiod/main.cpp
+1
-2
未找到文件。
plugins/CMakeLists.txt
浏览文件 @
fdc44be2
add_subdirectory
(
net_plugin
)
#
add_subdirectory(net_plugin)
#add_subdirectory(p2p_plugin)
add_subdirectory
(
http_plugin
)
add_subdirectory
(
chain_plugin
)
...
...
plugins/net_plugin/include/eos/net_plugin/net_plugin.hpp
浏览文件 @
fdc44be2
...
...
@@ -4,7 +4,7 @@
*/
#pragma once
#include <appbase/application.hpp>
#include <eos
io
/chain_plugin/chain_plugin.hpp>
#include <eos/chain_plugin/chain_plugin.hpp>
namespace
eosio
{
using
namespace
appbase
;
...
...
plugins/net_plugin/include/eos/net_plugin/protocol.hpp
浏览文件 @
fdc44be2
...
...
@@ -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
)
)
...
...
plugins/net_plugin/net_plugin.cpp
浏览文件 @
fdc44be2
...
...
@@ -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_m
root = msg.block_header.transaction_m
root;
sb.
new_producers = msg.block_header.new_producer
s;
sb
.
transaction_m
erkle_root
=
msg
.
block_header
.
transaction_merkle_
root
;
sb
.
producer_changes
=
msg
.
block_header
.
producer_change
s
;
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::
shar
d( ) );
eosio::chain::
shar
d &cyc_thr = sbcycle.back();
sbcycle
.
emplace_back
(
eosio
::
chain
::
threa
d
(
)
);
eosio
::
chain
::
threa
d
&
cyc_thr
=
sbcycle
.
back
();
/*
for( auto > : 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'"
)
;
}
...
...
programs/eosiod/CMakeLists.txt
浏览文件 @
fdc44be2
...
...
@@ -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
}
)
...
...
programs/eosiod/main.cpp
浏览文件 @
fdc44be2
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录