Skip to content

Commit

Permalink
Fix RPC "active_difficulty" returning empty string as "difficulty_tre…
Browse files Browse the repository at this point in the history
  • Loading branch information
shryder committed Jun 16, 2021
1 parent 96ccbda commit d2b072e
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions nano/node/json_handler.cpp
Expand Up @@ -1024,8 +1024,14 @@ void nano::json_handler::active_difficulty ()
response_l.put ("multiplier", 1.0);
if (include_trend)
{
boost::property_tree::ptree trend_entry_l;
response_l.add_child ("difficulty_trend", trend_entry_l);
boost::property_tree::ptree difficulty_trend_l;

// To keep this RPC backwards-compatible
boost::property_tree::ptree entry;
entry.put ("", "1.000000000000000");
difficulty_trend_l.push_back (std::make_pair ("", entry));

response_l.add_child ("difficulty_trend", difficulty_trend_l);
}
response_errors ();
}
Expand Down

0 comments on commit d2b072e

Please sign in to comment.