Closed contester202210 closed 2 years ago
If new_state is null, we must return the bid to the bidder. In case of an exception, it will be returned to the collection.
Why do you think that this is an optimization?
I don't think it is correct to throw an exception if to_send <= 0
.
Add exception in the case when new_state is null because of any reason
Slightly optimize royalty calculation. Important note: this commit should be fixed:
int royalty_value = min(bid, muldiv(bid, royalty_num, royalty_denum));
toint royalty_value = muldiv(bid, royalty_num, royalty_denum);
on line 44royalty_value = bid;
between line 41 and line 42Just found this a few minutes after the contest ended, that's why I'm writing about it here and not committing it as a fix. Made the commit in a hurry just before the end of the contest :)