generate difficulty was passing hash by ref (#2008)
and could go out of scope before the callback was called copy into lambda instead
This commit is contained in:
parent
892d1c54af
commit
24734f64cf
1 changed files with 1 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue