Commit 4bb55d51 authored by Bartek Wrona's avatar Bartek Wrona

sbd_interest_rate/sbd_exchange_rate properties take precedence over hbd_ ones until HF24

parent 7827098a
......@@ -176,9 +176,10 @@ void witness_set_properties_evaluator::do_apply( const witness_set_properties_op
fc::raw::unpack_from_vector( itr->second, props.maximum_block_size );
}
itr = o.props.find( "hbd_interest_rate" );
if( itr == o.props.end() )
itr = o.props.find( "sbd_interest_rate" );
itr = o.props.find( "sbd_interest_rate" );
if(itr == o.props.end() && _db.has_hardfork(HIVE_HARDFORK_1_24))
itr = o.props.find( "hbd_interest_rate" );
flags.hbd_interest_changed = itr != o.props.end();
if( flags.hbd_interest_changed )
{
......@@ -206,9 +207,9 @@ void witness_set_properties_evaluator::do_apply( const witness_set_properties_op
fc::raw::unpack_from_vector( itr->second, signing_key );
}
itr = o.props.find( "hbd_exchange_rate" );
if( itr == o.props.end() )
itr = o.props.find( "sbd_exchange_rate" );
itr = o.props.find( "sbd_exchange_rate" );
if(itr == o.props.end() && _db.has_hardfork(HIVE_HARDFORK_1_24))
itr = o.props.find("hbd_exchange_rate");
flags.hbd_exchange_changed = itr != o.props.end();
if( flags.hbd_exchange_changed )
......
......@@ -269,9 +269,9 @@ namespace hive { namespace protocol {
FC_ASSERT( maximum_block_size >= HIVE_MIN_BLOCK_SIZE_LIMIT, "maximum_block_size smaller than minimum max block size" );
}
itr = props.find( "hbd_interest_rate" );
itr = props.find( "sbd_interest_rate" );
if( itr == props.end() )
itr = props.find( "sbd_interest_rate" );
itr = props.find( "hbd_interest_rate" );
if( itr != props.end() )
{
......@@ -289,9 +289,9 @@ namespace hive { namespace protocol {
FC_UNUSED( signing_key ); // This tests the deserialization of the key
}
itr = props.find( "hbd_exchange_rate" );
itr = props.find( "sbd_exchange_rate" );
if( itr == props.end() )
itr = props.find( "sbd_exchange_rate" );
itr = props.find( "hbd_exchange_rate" );
if( itr != props.end() )
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment