Changing to a more reasonable receive_minimum.

This commit is contained in:
clemahieu 2016-04-19 21:03:45 -05:00
commit afdbe0c6ef

View file

@ -630,7 +630,7 @@ work_threads (std::max <unsigned> (4, std::thread::hardware_concurrency ()))
void rai::node_config::serialize_json (boost::property_tree::ptree & tree_a) const
{
tree_a.put ("version", "3");
tree_a.put ("version", "4");
tree_a.put ("peering_port", std::to_string (peering_port));
tree_a.put ("packet_delay_microseconds", std::to_string (packet_delay_microseconds));
tree_a.put ("bootstrap_fraction_numerator", std::to_string (bootstrap_fraction_numerator));
@ -704,6 +704,13 @@ bool rai::node_config::upgrade_json (unsigned version, boost::property_tree::ptr
result = true;
}
case 3:
tree_a.erase ("receive_minimum");
tree_a.put ("receive_minimum", rai::rai_ratio.convert_to <std::string> ());
tree_a.erase ("version");
tree_a.put ("version", "4");
result = true;
break;
case 4:
break;
default:
throw std::runtime_error ("Unknown node_config version");