Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove custom operation plugin check from custom api creation #2033

Merged
merged 3 commits into from
Oct 29, 2019
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions libraries/wallet/wallet_api_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,15 @@ namespace graphene { namespace wallet { namespace detail {
_remote_api(rapi),
_remote_db(rapi->database()),
_remote_net_broadcast(rapi->network_broadcast()),
_remote_hist(rapi->history()),
_custom_operations(rapi->custom())
_remote_hist(rapi->history())
{
try {
_custom_operations = rapi->custom();
}
catch(const fc::exception& e)
{
wlog("Custom operations plugin is not loaded.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better: Custom operations API is not active on server.
What happens in this case if get_account_storage is invoked?

Copy link
Member Author

@oxarbitrage oxarbitrage Oct 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Better: Custom operations API is not active on server.

Changed.

What happens in this case if get_account_storage is invoked?

Crash, added try to call, thanks :)

Both changes at f6738ec

Note: No need to add try at account_store_map as it does not use the API. custom operations can be created without the plugin or the api being enabled, not possible to read without them.

}
chain_id_type remote_chain_id = _remote_db->get_chain_id();
if( remote_chain_id != _chain_id )
{
Expand Down