Skip to content

Commit

Permalink
Merge pull request #1959 from crypto-ape/warning_and_infotext_fixes
Browse files Browse the repository at this point in the history
Warning and Infotext Fixes
  • Loading branch information
pmconrad committed Aug 27, 2019
2 parents fccca92 + db36b54 commit 3e372ed
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions libraries/chain/db_maint.cpp
Expand Up @@ -439,7 +439,7 @@ void database::initialize_budget_record( fc::time_point_sec now, budget_record&
// be able to use the entire reserve
budget_u128 += ((uint64_t(1) << GRAPHENE_CORE_ASSET_CYCLE_RATE_BITS) - 1);
budget_u128 >>= GRAPHENE_CORE_ASSET_CYCLE_RATE_BITS;
if( budget_u128 < reserve.value )
if( budget_u128 < static_cast<fc::uint128_t>(reserve.value) )
rec.total_budget = share_type(static_cast<uint64_t>(budget_u128));
else
rec.total_budget = reserve;
Expand Down Expand Up @@ -492,7 +492,7 @@ void database::process_budget()
worker_budget_u128 /= 60*60*24;

share_type worker_budget;
if( worker_budget_u128 >= available_funds.value )
if( worker_budget_u128 >= static_cast<fc::uint128_t>(available_funds.value) )
worker_budget = available_funds;
else
worker_budget = static_cast<uint64_t>(worker_budget_u128);
Expand Down
2 changes: 1 addition & 1 deletion libraries/chain/vesting_balance_object.cpp
Expand Up @@ -117,7 +117,7 @@ asset cdd_vesting_policy::get_allowed_withdraw(const vesting_policy_context& ctx
return asset(0, ctx.balance.asset_id);
fc::uint128_t cs_earned = compute_coin_seconds_earned(ctx);
fc::uint128_t withdraw_available = cs_earned / std::max(vesting_seconds, 1u);
assert(withdraw_available <= ctx.balance.amount.value);
assert(withdraw_available <= static_cast<fc::uint128_t>(ctx.balance.amount.value));
return asset(static_cast<uint64_t>(withdraw_available), ctx.balance.asset_id);
}

Expand Down
2 changes: 1 addition & 1 deletion tests/tests/htlc_tests.cpp
Expand Up @@ -93,7 +93,7 @@ try {
// Alice puts a contract on the blockchain
{
graphene::chain::htlc_create_operation create_operation;
BOOST_TEST_MESSAGE("Alice (who has 100 coins, is transferring 2 coins to Bob");
BOOST_TEST_MESSAGE("Alice (who has 100 coins, is transferring 3 coins to Bob");
create_operation.amount = graphene::chain::asset( 3 * GRAPHENE_BLOCKCHAIN_PRECISION );
create_operation.to = bob_id;
create_operation.claim_period_seconds = 60;
Expand Down

0 comments on commit 3e372ed

Please sign in to comment.