-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
daemon, wallet: new pay for RPC use system #5357
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -58,16 +58,6 @@ class t_core final | |
) | ||
: m_core{nullptr} | ||
, m_vm_HACK{vm} | ||
{ | ||
} | ||
|
||
// TODO - get rid of circular dependencies in internals | ||
void set_protocol(t_protocol_raw & protocol) | ||
{ | ||
m_core.set_cryptonote_protocol(&protocol); | ||
} | ||
|
||
bool run() | ||
{ | ||
//initialize core here | ||
MGINFO("Initializing core..."); | ||
|
@@ -78,9 +68,19 @@ class t_core final | |
#endif | ||
if (!m_core.init(m_vm_HACK, nullptr, get_checkpoints)) | ||
{ | ||
return false; | ||
throw std::runtime_error("Failed to initialize core"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Its not obvious why the code in the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This was because RPC was initialized before core. RPC init now uses core (via nettype()). |
||
} | ||
MGINFO("Core initialized OK"); | ||
} | ||
|
||
// TODO - get rid of circular dependencies in internals | ||
void set_protocol(t_protocol_raw & protocol) | ||
{ | ||
m_core.set_cryptonote_protocol(&protocol); | ||
} | ||
|
||
bool run() | ||
{ | ||
return true; | ||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someday the haskell overlords will complete their C++ takeover with a
expect<variant<t_response, json_rpc::error>>
return-value here.