#421 fix double in consensus of nft_lottery_token_purchase
This commit is contained in:
parent
70cd09495e
commit
e44ed0cfe5
2 changed files with 4 additions and 4 deletions
|
|
@ -18,7 +18,7 @@ namespace graphene
|
|||
// Buyer purchasing lottery tickets
|
||||
account_id_type buyer;
|
||||
// count of tickets to buy
|
||||
uint64_t tickets_to_buy;
|
||||
share_type tickets_to_buy;
|
||||
// amount that can spent
|
||||
asset amount;
|
||||
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ namespace graphene
|
|||
|
||||
auto lottery_options = lottery_md_obj.lottery_data->lottery_options;
|
||||
FC_ASSERT(lottery_options.ticket_price.asset_id == op.amount.asset_id);
|
||||
FC_ASSERT((double)op.amount.amount.value / lottery_options.ticket_price.amount.value == (double)op.tickets_to_buy);
|
||||
FC_ASSERT(op.tickets_to_buy * lottery_options.ticket_price.amount.value == op.amount.amount.value);
|
||||
return void_result();
|
||||
}
|
||||
FC_CAPTURE_AND_RETHROW((op))
|
||||
|
|
|
|||
Loading…
Reference in a new issue