Skip to content

Commit

Permalink
C-HOTFIX-decode NaN integer error on some raw tx
Browse files Browse the repository at this point in the history
  • Loading branch information
codrush committed Apr 16, 2020
1 parent f4ce20e commit 2ad9ffd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/lib/explorer/json_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,12 @@ Json::Value json_helper::prop_attenuation_model_param(const std::string& param_s
}
}
else {
uint64_t num = std::stoull(value);
uint64_t num = std::numeric_limits<uint64_t>::max();
if (value[0] >= '0' && value[0] <= '9') {
num = stoull(value);
} else {
tree[key] = value;
}
auto display_key = chain::attenuation_model::get_name_of_key(key);
tree[display_key] = num;
}
Expand Down

0 comments on commit 2ad9ffd

Please sign in to comment.