Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
YottaChain
YTBP
提交
1fd2a4cc
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,发现更多精彩内容 >>
提交
1fd2a4cc
编写于
8月 10, 2018
作者:
K
Kevin Heifner
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix history plugin not enabled message
上级
e58b62c4
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
1 addition
and
736 deletion
+1
-736
plugins/account_history_api_plugin/CMakeLists.txt
plugins/account_history_api_plugin/CMakeLists.txt
+0
-7
plugins/account_history_api_plugin/account_history_api_plugin.cpp
...account_history_api_plugin/account_history_api_plugin.cpp
+0
-53
plugins/account_history_api_plugin/include/eosio/account_history_api_plugin/account_history_api_plugin.hpp
...account_history_api_plugin/account_history_api_plugin.hpp
+0
-33
plugins/account_history_plugin/CMakeLists.txt
plugins/account_history_plugin/CMakeLists.txt
+0
-7
plugins/account_history_plugin/account_history_plugin.cpp
plugins/account_history_plugin/account_history_plugin.cpp
+0
-534
plugins/account_history_plugin/include/eosio/account_history_plugin/account_transaction_history_object.hpp
...unt_history_plugin/account_transaction_history_object.hpp
+0
-59
plugins/account_history_plugin/include/eosio/account_history_plugin/transaction_history_object.hpp
...sio/account_history_plugin/transaction_history_object.hpp
+0
-42
programs/cleos/httpc.cpp
programs/cleos/httpc.cpp
+1
-1
未找到文件。
plugins/account_history_api_plugin/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
e58b62c4
file
(
GLOB HEADERS
"include/eosio/account_history_api_plugin/*.hpp"
)
add_library
(
account_history_api_plugin
account_history_api_plugin.cpp
${
HEADERS
}
)
target_link_libraries
(
account_history_api_plugin account_history_plugin chain_plugin http_plugin appbase
)
target_include_directories
(
account_history_api_plugin PUBLIC
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include"
)
plugins/account_history_api_plugin/account_history_api_plugin.cpp
已删除
100644 → 0
浏览文件 @
e58b62c4
/**
* @file
* @copyright defined in eos/LICENSE.txt
*/
#include <eosio/account_history_api_plugin/account_history_api_plugin.hpp>
#include <eosio/chain/chain_controller.hpp>
#include <eosio/chain/exceptions.hpp>
#include <fc/io/json.hpp>
namespace
eosio
{
using
namespace
eosio
;
static
appbase
::
abstract_plugin
&
_account_history_api_plugin
=
app
().
register_plugin
<
account_history_api_plugin
>
();
account_history_api_plugin
::
account_history_api_plugin
(){}
account_history_api_plugin
::~
account_history_api_plugin
(){}
void
account_history_api_plugin
::
set_program_options
(
options_description
&
,
options_description
&
)
{}
void
account_history_api_plugin
::
plugin_initialize
(
const
variables_map
&
)
{}
#define CALL(api_name, api_handle, api_namespace, call_name) \
{std::string("/v1/" #api_name "/" #call_name), \
[this, api_handle](string, string body, url_response_callback cb) mutable { \
try { \
if (body.empty()) body = "{}"; \
auto result = api_handle.call_name(fc::json::from_string(body).as<api_namespace::call_name ## _params>()); \
cb(200, fc::json::to_string(result)); \
} catch (...) { \
http_plugin::handle_exception(#api_name, #call_name, body, cb); \
} \
}}
#define CHAIN_RO_CALL(call_name) CALL(account_history, ro_api, account_history_apis::read_only, call_name)
#define CHAIN_RW_CALL(call_name) CALL(account_history, rw_api, account_history_apis::read_write, call_name)
void
account_history_api_plugin
::
plugin_startup
()
{
ilog
(
"starting account_history_api_plugin"
);
auto
ro_api
=
app
().
get_plugin
<
account_history_plugin
>
().
get_read_only_api
();
auto
rw_api
=
app
().
get_plugin
<
account_history_plugin
>
().
get_read_write_api
();
app
().
get_plugin
<
http_plugin
>
().
add_api
({
CHAIN_RO_CALL
(
get_transaction
),
CHAIN_RO_CALL
(
get_transactions
),
CHAIN_RO_CALL
(
get_key_accounts
),
CHAIN_RO_CALL
(
get_controlled_accounts
)
});
}
void
account_history_api_plugin
::
plugin_shutdown
()
{}
}
plugins/account_history_api_plugin/include/eosio/account_history_api_plugin/account_history_api_plugin.hpp
已删除
100644 → 0
浏览文件 @
e58b62c4
/**
* @file
* @copyright defined in eos/LICENSE.txt
*/
#pragma once
#include <eosio/account_history_plugin/account_history_plugin.hpp>
#include <eosio/chain_plugin/chain_plugin.hpp>
#include <eosio/http_plugin/http_plugin.hpp>
#include <appbase/application.hpp>
namespace
eosio
{
using
namespace
appbase
;
class
account_history_api_plugin
:
public
plugin
<
account_history_api_plugin
>
{
public:
APPBASE_PLUGIN_REQUIRES
((
account_history_plugin
)(
chain_plugin
)(
http_plugin
))
account_history_api_plugin
();
virtual
~
account_history_api_plugin
();
virtual
void
set_program_options
(
options_description
&
,
options_description
&
)
override
;
void
plugin_initialize
(
const
variables_map
&
);
void
plugin_startup
();
void
plugin_shutdown
();
private:
};
}
plugins/account_history_plugin/CMakeLists.txt
已删除
100644 → 0
浏览文件 @
e58b62c4
file
(
GLOB HEADERS
"include/eosio/account_history_plugin/*.hpp"
)
add_library
(
account_history_plugin
account_history_plugin.cpp
${
HEADERS
}
)
target_link_libraries
(
account_history_plugin chain_plugin eosio_chain appbase
)
target_include_directories
(
account_history_plugin PUBLIC
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/include"
)
plugins/account_history_plugin/account_history_plugin.cpp
已删除
100644 → 0
浏览文件 @
e58b62c4
此差异已折叠。
点击以展开。
plugins/account_history_plugin/include/eosio/account_history_plugin/account_transaction_history_object.hpp
已删除
100644 → 0
浏览文件 @
e58b62c4
/**
* @file
* @copyright defined in eos/LICENSE.txt
*/
#pragma once
#include <chainbase/chainbase.hpp>
#include <eosio/chain/types.hpp>
namespace
std
{
template
<
>
struct
hash
<
eosio
::
chain
::
account_name
>
{
size_t
operator
()(
const
eosio
::
chain
::
account_name
&
name
)
const
{
return
(
uint64_t
)
name
;
}
};
}
namespace
eosio
{
using
chain
::
account_name
;
using
chain
::
shared_vector
;
using
chain
::
transaction_id_type
;
using
namespace
boost
::
multi_index
;
class
account_transaction_history_object
:
public
chainbase
::
object
<
chain
::
account_transaction_history_object_type
,
account_transaction_history_object
>
{
OBJECT_CTOR
(
account_transaction_history_object
)
id_type
id
;
account_name
name
;
transaction_id_type
transaction_id
;
};
struct
by_id
;
struct
by_account_name
;
struct
by_account_name_trx_id
;
using
account_transaction_history_multi_index
=
chainbase
::
shared_multi_index_container
<
account_transaction_history_object
,
indexed_by
<
ordered_unique
<
tag
<
by_id
>
,
BOOST_MULTI_INDEX_MEMBER
(
account_transaction_history_object
,
account_transaction_history_object
::
id_type
,
id
)
>
,
ordered_unique
<
tag
<
by_account_name
>
,
composite_key
<
account_transaction_history_object
,
member
<
account_transaction_history_object
,
account_name
,
&
account_transaction_history_object
::
name
>
,
member
<
account_transaction_history_object
,
transaction_id_type
,
&
account_transaction_history_object
::
transaction_id
>
>
>
>
>
;
typedef
chainbase
::
generic_index
<
account_transaction_history_multi_index
>
account_transaction_history_index
;
}
CHAINBASE_SET_INDEX_TYPE
(
eosio
::
account_transaction_history_object
,
eosio
::
account_transaction_history_multi_index
)
FC_REFLECT
(
eosio
::
account_transaction_history_object
,
(
name
)(
transaction_id
)
)
plugins/account_history_plugin/include/eosio/account_history_plugin/transaction_history_object.hpp
已删除
100644 → 0
浏览文件 @
e58b62c4
/**
* @file
* @copyright defined in eos/LICENSE.txt
*/
#pragma once
#include <chainbase/chainbase.hpp>
#include <eosio/chain/transaction.hpp>
namespace
eosio
{
using
chain
::
block_id_type
;
using
chain
::
transaction_id_type
;
using
chain
::
transaction_receipt
;
using
namespace
boost
::
multi_index
;
class
transaction_history_object
:
public
chainbase
::
object
<
chain
::
transaction_history_object_type
,
transaction_history_object
>
{
OBJECT_CTOR
(
transaction_history_object
)
id_type
id
;
block_id_type
block_id
;
transaction_id_type
transaction_id
;
transaction_receipt
::
status_enum
transaction_status
;
};
struct
by_id
;
struct
by_trx_id
;
using
transaction_history_multi_index
=
chainbase
::
shared_multi_index_container
<
transaction_history_object
,
indexed_by
<
ordered_unique
<
tag
<
by_id
>
,
BOOST_MULTI_INDEX_MEMBER
(
transaction_history_object
,
transaction_history_object
::
id_type
,
id
)
>
,
ordered_unique
<
tag
<
by_trx_id
>
,
BOOST_MULTI_INDEX_MEMBER
(
transaction_history_object
,
transaction_id_type
,
transaction_id
)
>
>
>
;
typedef
chainbase
::
generic_index
<
transaction_history_multi_index
>
transaction_history_index
;
}
CHAINBASE_SET_INDEX_TYPE
(
eosio
::
transaction_history_object
,
eosio
::
transaction_history_multi_index
)
FC_REFLECT
(
eosio
::
transaction_history_object
,
(
block_id
)(
transaction_id
)(
transaction_status
)
)
programs/cleos/httpc.cpp
浏览文件 @
1fd2a4cc
...
...
@@ -255,7 +255,7 @@ namespace eosio { namespace client { namespace http {
throw
chain
::
missing_chain_api_plugin_exception
(
FC_LOG_MESSAGE
(
error
,
"Chain API plugin is not enabled"
));
}
else
if
(
url
.
path
.
compare
(
0
,
wallet_func_base
.
size
(),
wallet_func_base
)
==
0
)
{
throw
chain
::
missing_wallet_api_plugin_exception
(
FC_LOG_MESSAGE
(
error
,
"Wallet is not available"
));
}
else
if
(
url
.
path
.
compare
(
0
,
account_history_func_base
.
size
(),
account_
history_func_base
)
==
0
)
{
}
else
if
(
url
.
path
.
compare
(
0
,
history_func_base
.
size
(),
history_func_base
)
==
0
)
{
throw
chain
::
missing_history_api_plugin_exception
(
FC_LOG_MESSAGE
(
error
,
"History API plugin is not enabled"
));
}
else
if
(
url
.
path
.
compare
(
0
,
net_func_base
.
size
(),
net_func_base
)
==
0
)
{
throw
chain
::
missing_net_api_plugin_exception
(
FC_LOG_MESSAGE
(
error
,
"Net API plugin is not enabled"
));
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录