issue with withdrawl
This commit is contained in:
parent
943953c66d
commit
9c1e7af9c7
2 changed files with 3 additions and 3 deletions
|
|
@ -123,7 +123,7 @@ operation_result vesting_balance_withdraw_evaluator::start_evaluate( transaction
|
|||
|
||||
const time_point_sec now = d.head_block_time();
|
||||
|
||||
if(now >= (fc::time_point_sec(1570114100)) )
|
||||
if(now >= HARDFORK_GPOS_TIME )
|
||||
{
|
||||
if(oper.fee.amount == 0)
|
||||
{
|
||||
|
|
@ -145,7 +145,7 @@ void_result vesting_balance_withdraw_evaluator::do_evaluate( const vesting_balan
|
|||
|
||||
const vesting_balance_object& vbo = op.vesting_balance( d );
|
||||
FC_ASSERT( op.owner == vbo.owner, "", ("op.owner", op.owner)("vbo.owner", vbo.owner) );
|
||||
FC_ASSERT( vbo.is_withdraw_allowed( now, op.amount ), "${balance_type} Vested Balance cannot be withdrawn during the locking period",
|
||||
FC_ASSERT( vbo.is_withdraw_allowed( now, op.amount ), "Account has either insufficient ${balance_type} Vested Balance or lock-in period is not matured",
|
||||
("balance_type", get_vesting_balance_type(vbo.balance_type))("now", now)("op", op)("vbo", vbo) );
|
||||
assert( op.amount <= vbo.balance ); // is_withdraw_allowed should fail before this check is reached
|
||||
|
||||
|
|
|
|||
|
|
@ -2138,7 +2138,7 @@ public:
|
|||
|
||||
vesting_balance_withdraw_op.vesting_balance = *vest_id;
|
||||
vesting_balance_withdraw_op.owner = vbo.owner;
|
||||
if(withdraw_amount.amount >= vbo.balance.amount)
|
||||
if(withdraw_amount.amount > vbo.balance.amount)
|
||||
{
|
||||
vesting_balance_withdraw_op.amount = vbo.balance.amount;
|
||||
withdraw_amount.amount -= vbo.balance.amount;
|
||||
|
|
|
|||
Loading…
Reference in a new issue