Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
cfcba8d1
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,发现更多精彩内容 >>
未验证
提交
cfcba8d1
编写于
5月 22, 2018
作者:
Z
zorba80
提交者:
GitHub
5月 22, 2018
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into issue3189
上级
4c0fe744
f7f7b5f0
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
48 addition
and
23 deletion
+48
-23
Docker/cleos.sh
Docker/cleos.sh
+1
-1
Docker/docker-compose-dawn4.0.yaml
Docker/docker-compose-dawn4.0.yaml
+2
-2
libraries/appbase
libraries/appbase
+1
-1
libraries/chain/controller.cpp
libraries/chain/controller.cpp
+3
-0
libraries/chain/include/eosio/chain/controller.hpp
libraries/chain/include/eosio/chain/controller.hpp
+1
-0
plugins/chain_plugin/chain_plugin.cpp
plugins/chain_plugin/chain_plugin.cpp
+32
-18
plugins/producer_plugin/producer_plugin.cpp
plugins/producer_plugin/producer_plugin.cpp
+3
-1
programs/nodeos/main.cpp
programs/nodeos/main.cpp
+5
-0
未找到文件。
Docker/cleos.sh
浏览文件 @
cfcba8d1
...
...
@@ -4,7 +4,7 @@
# Go into cmd loop: sudo ./cleos.sh
# Run single cmd: sudo ./cleos.sh <cleos paramers>
PREFIX
=
"docker exec docker_nodeos_1 cleos"
PREFIX
=
"docker exec docker_nodeos
d
_1 cleos"
if
[
-z
$1
]
;
then
while
:
do
...
...
Docker/docker-compose-dawn4.0.yaml
浏览文件 @
cfcba8d1
...
...
@@ -11,7 +11,7 @@ services:
nodeosd
:
image
:
eosio/eos:latest
command
:
/opt/eosio/bin/nodeosd.sh --data-dir /opt/eosio/bin/data-dir --resync --mongodb-uri mongodb://mongo:27017/EOS
command
:
/opt/eosio/bin/nodeosd.sh --data-dir /opt/eosio/bin/data-dir --resync
#
--mongodb-uri mongodb://mongo:27017/EOS
hostname
:
nodeosd
links
:
-
mongo
...
...
@@ -38,4 +38,4 @@ volumes:
nodeos-data-volume
:
external
:
true
keosd-data-volume
:
external
:
true
\ No newline at end of file
external
:
true
appbase
@
70e23f7e
比较
50dc015b
...
70e23f7e
Subproject commit
50dc015b2f0e25c0cd01cf520245da23c0ed446b
Subproject commit
70e23f7ebbdccb64f9ac11ade9fa41ba78b31b5e
libraries/chain/controller.cpp
浏览文件 @
cfcba8d1
...
...
@@ -143,6 +143,9 @@ struct controller_impl {
void
emit
(
const
Signal
&
s
,
Arg
&&
a
)
{
try
{
s
(
std
::
forward
<
Arg
>
(
a
));
}
catch
(
boost
::
interprocess
::
bad_alloc
&
e
)
{
wlog
(
"bad alloc"
);
throw
e
;
}
catch
(
fc
::
exception
&
e
)
{
wlog
(
"${details}"
,
(
"details"
,
e
.
to_detail_string
())
);
}
catch
(
...
)
{
...
...
libraries/chain/include/eosio/chain/controller.hpp
浏览文件 @
cfcba8d1
...
...
@@ -158,6 +158,7 @@ namespace eosio { namespace chain {
signal
<
void
(
const
transaction_metadata_ptr
&
)
>
accepted_transaction
;
signal
<
void
(
const
transaction_trace_ptr
&
)
>
applied_transaction
;
signal
<
void
(
const
header_confirmation
&
)
>
accepted_confirmation
;
signal
<
void
(
const
int
&
)
>
bad_alloc
;
/*
signal<void()> pre_apply_block;
...
...
plugins/chain_plugin/chain_plugin.cpp
浏览文件 @
cfcba8d1
...
...
@@ -23,6 +23,7 @@
#include <fc/io/json.hpp>
#include <fc/variant.hpp>
#include <signal.h>
namespace
eosio
{
...
...
@@ -268,7 +269,6 @@ void chain_plugin::plugin_startup()
(
"num"
,
my
->
chain
->
head_block_num
())(
"ts"
,
(
std
::
string
)
my
->
chain_config
->
genesis
.
initial_timestamp
));
my
->
chain_config
.
reset
();
}
FC_CAPTURE_LOG_AND_RETHROW
(
(
my
->
genesis_file
.
generic_string
())
)
}
void
chain_plugin
::
plugin_shutdown
()
{
...
...
@@ -524,36 +524,50 @@ fc::variant read_only::get_block(const read_only::get_block_params& params) cons
}
read_write
::
push_block_results
read_write
::
push_block
(
const
read_write
::
push_block_params
&
params
)
{
db
.
push_block
(
std
::
make_shared
<
signed_block
>
(
params
)
);
try
{
db
.
push_block
(
std
::
make_shared
<
signed_block
>
(
params
)
);
}
catch
(
...
)
{
raise
(
SIGUSR1
);
}
return
read_write
::
push_block_results
();
}
read_write
::
push_transaction_results
read_write
::
push_transaction
(
const
read_write
::
push_transaction_params
&
params
)
{
auto
pretty_input
=
std
::
make_shared
<
packed_transaction
>
()
;
auto
resolver
=
make_resolver
(
this
)
;
chain
::
transaction_id_type
id
;
fc
::
variant
pretty_output
;
try
{
abi_serializer
::
from_variant
(
params
,
*
pretty_input
,
resolver
);
}
EOS_RETHROW_EXCEPTIONS
(
chain
::
packed_transaction_type_exception
,
"Invalid packed transaction"
)
auto
pretty_input
=
std
::
make_shared
<
packed_transaction
>
();
auto
resolver
=
make_resolver
(
this
);
try
{
abi_serializer
::
from_variant
(
params
,
*
pretty_input
,
resolver
);
}
EOS_RETHROW_EXCEPTIONS
(
chain
::
packed_transaction_type_exception
,
"Invalid packed transaction"
)
auto
trx_trace_ptr
=
app
().
get_method
<
incoming
::
methods
::
transaction_sync
>
()(
pretty_input
);
auto
trx_trace_ptr
=
app
().
get_method
<
incoming
::
methods
::
transaction_sync
>
()(
pretty_input
);
fc
::
variant
pretty_output
=
db
.
to_variant_with_abi
(
*
trx_trace_ptr
);;
//abi_serializer::to_variant(*trx_trace_ptr, pretty_output, resolver);
return
read_write
::
push_transaction_results
{
trx_trace_ptr
->
id
,
pretty_output
};
pretty_output
=
db
.
to_variant_with_abi
(
*
trx_trace_ptr
);;
//abi_serializer::to_variant(*trx_trace_ptr, pretty_output, resolver);
id
=
trx_trace_ptr
->
id
;
}
catch
(
...
)
{
raise
(
SIGUSR1
);
}
return
read_write
::
push_transaction_results
{
id
,
pretty_output
};
}
read_write
::
push_transactions_results
read_write
::
push_transactions
(
const
read_write
::
push_transactions_params
&
params
)
{
FC_ASSERT
(
params
.
size
()
<=
1000
,
"Attempt to push too many transactions at once"
);
push_transactions_results
result
;
result
.
reserve
(
params
.
size
());
for
(
const
auto
&
item
:
params
)
{
try
{
result
.
emplace_back
(
push_transaction
(
item
)
);
}
catch
(
const
fc
::
exception
&
e
)
{
result
.
emplace_back
(
read_write
::
push_transaction_results
{
transaction_id_type
(),
fc
::
mutable_variant_object
(
"error"
,
e
.
to_detail_string
()
)
}
);
try
{
result
.
reserve
(
params
.
size
());
for
(
const
auto
&
item
:
params
)
{
try
{
result
.
emplace_back
(
push_transaction
(
item
)
);
}
catch
(
const
fc
::
exception
&
e
)
{
result
.
emplace_back
(
read_write
::
push_transaction_results
{
transaction_id_type
(),
fc
::
mutable_variant_object
(
"error"
,
e
.
to_detail_string
()
)
}
);
}
}
}
catch
(
...
)
{
raise
(
SIGUSR1
);
}
return
result
;
}
...
...
plugins/producer_plugin/producer_plugin.cpp
浏览文件 @
cfcba8d1
...
...
@@ -73,7 +73,8 @@ class producer_plugin_impl {
producer_plugin_impl
(
boost
::
asio
::
io_service
&
io
)
:
_timer
(
io
)
,
_transaction_ack_channel
(
app
().
get_channel
<
compat
::
channels
::
transaction_ack
>
())
{}
{
}
void
schedule_production_loop
();
block_production_condition
::
block_production_condition_enum
block_production_loop
();
...
...
@@ -186,6 +187,7 @@ class producer_plugin_impl {
chain
::
controller
&
chain
=
app
().
get_plugin
<
chain_plugin
>
().
chain
();
// abort the pending block
chain
.
abort_block
();
...
...
programs/nodeos/main.cpp
浏览文件 @
cfcba8d1
...
...
@@ -97,6 +97,10 @@ int main(int argc, char** argv)
app
().
exec
();
}
catch
(
const
fc
::
exception
&
e
)
{
elog
(
"${e}"
,
(
"e"
,
e
.
to_detail_string
()));
}
catch
(
const
boost
::
interprocess
::
bad_alloc
&
e
)
{
elog
(
"bad alloc"
);
//elog("${e}", ("e", boost::diagnostic_information(e)));
return
3
;
}
catch
(
const
boost
::
exception
&
e
)
{
elog
(
"${e}"
,
(
"e"
,
boost
::
diagnostic_information
(
e
)));
}
catch
(
const
std
::
exception
&
e
)
{
...
...
@@ -104,5 +108,6 @@ int main(int argc, char** argv)
}
catch
(...)
{
elog
(
"unknown exception"
);
}
return
0
;
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录