Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
cd7d0c67
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,发现更多精彩内容 >>
提交
cd7d0c67
编写于
9月 08, 2017
作者:
B
Bart Wyatt
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
changed inline transaction to be optional ref EOSIO/eos#175
上级
4f3ee206
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
15 addition
and
5 deletion
+15
-5
libraries/chain/chain_controller.cpp
libraries/chain/chain_controller.cpp
+14
-4
libraries/chain/include/eos/chain/transaction.hpp
libraries/chain/include/eos/chain/transaction.hpp
+1
-1
未找到文件。
libraries/chain/chain_controller.cpp
浏览文件 @
cd7d0c67
...
...
@@ -584,6 +584,14 @@ void check_output(const vector<T>& expected, const vector<T>& actual, const path
}
}
template
<
typename
T
>
void
check_output
(
const
fc
::
optional
<
T
>&
expected
,
const
fc
::
optional
<
T
>&
actual
,
const
path_cons_list
&
path
)
{
check_output
(
expected
.
valid
(),
actual
.
valid
(),
path
(
".valid()"
));
if
(
expected
.
valid
())
{
check_output
(
*
expected
,
*
actual
,
path
);
}
}
template
<
>
void
check_output
(
const
types
::
Bytes
&
expected
,
const
types
::
Bytes
&
actual
,
const
path_cons_list
&
path
)
{
check_output
(
expected
.
size
(),
actual
.
size
(),
path
(
".size()"
));
...
...
@@ -899,8 +907,10 @@ void chain_controller::process_message(const Transaction& trx, AccountName code,
}
// combine inline messages and process
output
.
inline_transaction
=
InlineTransaction
(
trx
);
output
.
inline_transaction
.
messages
=
std
::
move
(
apply_ctx
.
inline_messages
);
if
(
apply_ctx
.
inline_messages
.
size
()
>
0
)
{
output
.
inline_transaction
=
InlineTransaction
(
trx
);
(
*
output
.
inline_transaction
).
messages
=
std
::
move
(
apply_ctx
.
inline_messages
);
}
for
(
auto
&
asynctrx
:
apply_ctx
.
deferred_transactions
)
{
digest_type
::
encoder
enc
;
...
...
@@ -979,8 +989,8 @@ typename T::Processed chain_controller::process_transaction( const T& trx, int d
for
(
uint32_t
i
=
0
;
i
<
trx
.
messages
.
size
();
++
i
)
{
auto
&
output
=
ptrx
.
output
[
i
];
process_message
(
trx
,
trx
.
messages
[
i
].
code
,
trx
.
messages
[
i
],
output
);
if
(
output
.
inline_transaction
.
messages
.
size
()
>
0
)
{
output
.
inline_transaction
=
process_transaction
(
PendingInlineTransaction
(
output
.
inline_transaction
),
depth
+
1
,
start_time
);
if
(
output
.
inline_transaction
.
valid
()
)
{
output
.
inline_transaction
=
process_transaction
(
PendingInlineTransaction
(
*
output
.
inline_transaction
),
depth
+
1
,
start_time
);
}
}
...
...
libraries/chain/include/eos/chain/transaction.hpp
浏览文件 @
cd7d0c67
...
...
@@ -187,7 +187,7 @@ namespace eos { namespace chain {
*/
struct
MessageOutput
{
vector
<
NotifyOutput
>
notify
;
///< accounts to notify, may only be notified once
InlineTransaction
inline_transaction
;
///< transactions generated and applied after notify
fc
::
optional
<
InlineTransaction
>
inline_transaction
;
///< transactions generated and applied after notify
vector
<
GeneratedTransaction
>
deferred_transactions
;
///< transactions generated but not applied
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录