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

generate difficulty was passing hash by ref #2008

Changes from all commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.


Just for now

generate difficulty was passing hash by ref

and could go out of scope before the callback was called
copy into lambda instead
  • Loading branch information...
argakiig committed May 21, 2019
commit e8cc3e0ffe6d19a454a500794d421e45778355da
@@ -4353,7 +4353,7 @@ void nano::json_handler::work_generate ()
bool use_peers (request.get_optional<bool> ("use_peers") == true);
auto rpc_l (shared_from_this ());
auto callback = [rpc_l, &hash, this](boost::optional<uint64_t> const & work_a) {
auto callback = [rpc_l, hash, this](boost::optional<uint64_t> const & work_a) {
if (work_a)
boost::property_tree::ptree response_l;
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.