Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
5138e736
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,发现更多精彩内容 >>
提交
5138e736
编写于
4月 03, 2018
作者:
R
root
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed aliasing issue on Fedora
上级
96d220ec
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
9 addition
and
5 deletion
+9
-5
libraries/chain/chain_controller.cpp
libraries/chain/chain_controller.cpp
+2
-1
libraries/chain/contracts/eosio_contract.cpp
libraries/chain/contracts/eosio_contract.cpp
+6
-4
tests/chain_tests/delay_tests.cpp
tests/chain_tests/delay_tests.cpp
+1
-0
未找到文件。
libraries/chain/chain_controller.cpp
浏览文件 @
5138e736
...
...
@@ -369,7 +369,8 @@ transaction_trace chain_controller::delayed_transaction_processing( const transa
time_point_sec
execute_after
=
head_block_time
();
execute_after
+=
mtrx
.
delay
;
//TODO: !!! WHO GETS BILLED TO STORE THE DELAYED TX?
deferred_transaction
dtrx
(
*
reinterpret_cast
<
const
uint128_t
*>
(
trx
.
id
().
_hash
),
config
::
system_account_name
,
config
::
system_account_name
,
execute_after
,
trx
);
fc
::
uint128_t
_id
(
trx
.
id
().
_hash
[
3
],
trx
.
id
().
_hash
[
2
]);
deferred_transaction
dtrx
((
unsigned
__int128
)
_id
,
config
::
system_account_name
,
config
::
system_account_name
,
execute_after
,
trx
);
FC_ASSERT
(
dtrx
.
execute_after
<
dtrx
.
expiration
,
"transaction expires before it can execute"
);
result
.
deferred_transaction_requests
.
push_back
(
std
::
move
(
dtrx
));
...
...
libraries/chain/contracts/eosio_contract.cpp
浏览文件 @
5138e736
...
...
@@ -483,8 +483,9 @@ void apply_eosio_postrecovery(apply_context& context) {
.
parent
=
0
,
.
data
=
recover_act
.
data
},
update
);
auto
&
request_id
=
*
reinterpret_cast
<
const
uint128_t
*>
(
context
.
trx_meta
.
id
.
_hash
);
const
fc
::
uint128_t
_request_id
(
context
.
trx_meta
.
id
.
_hash
[
3
],
context
.
trx_meta
.
id
.
_hash
[
2
]);
const
uint128_t
request_id
=
(
unsigned
__int128
)
_request_id
;
auto
record_data
=
mutable_variant_object
()
(
"account"
,
account
)
(
"request_id"
,
request_id
)
...
...
@@ -592,8 +593,9 @@ void apply_eosio_canceldelay(apply_context& context) {
FC_ASSERT
(
found
,
"canceldelay action must be signed with the
\"
active
\"
permission for one of the actors"
" provided in the authorizations on the original transaction"
);
context
.
cancel_deferred
(
*
reinterpret_cast
<
const
uint128_t
*>
(
trx_id
.
_hash
));
const
fc
::
uint128_t
_id
(
trx_id
.
_hash
[
3
],
trx_id
.
_hash
[
2
]);
context
.
cancel_deferred
((
unsigned
__int128
)
_id
);
}
void
apply_eosio_mindelay
(
apply_context
&
context
)
{
...
...
tests/chain_tests/delay_tests.cpp
浏览文件 @
5138e736
...
...
@@ -1431,6 +1431,7 @@ BOOST_AUTO_TEST_CASE( canceldelay_test ) { try {
BOOST_REQUIRE_EQUAL
(
transaction_receipt
::
delayed
,
trace
.
status
);
BOOST_REQUIRE_EQUAL
(
1
,
trace
.
deferred_transaction_requests
.
size
());
BOOST_REQUIRE_EQUAL
(
0
,
trace
.
action_traces
.
size
());
const
auto
sender_id_to_cancel
=
trace
.
deferred_transaction_requests
[
0
].
get
<
deferred_transaction
>
().
sender_id
;
chain
.
produce_blocks
();
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录