Skip to content

Commit

Permalink
Return zero instead of null in compute_storage_fees (#810)
Browse files Browse the repository at this point in the history
Co-authored-by: SpyCheese <[email protected]>
  • Loading branch information
EmelyanenkoK and SpyCheese authored Nov 22, 2023
1 parent 1cffca0 commit 6b8994e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crypto/block/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ td::RefInt256 StoragePrices::compute_storage_fees(ton::UnixTime now, const std::
const vm::CellStorageStat& storage_stat, ton::UnixTime last_paid,
bool is_special, bool is_masterchain) {
if (now <= last_paid || !last_paid || is_special || pricing.empty() || now <= pricing[0].valid_since) {
return {};
return td::zero_refint();
}
std::size_t n = pricing.size(), i = n;
while (i && pricing[i - 1].valid_since > last_paid) {
Expand Down

0 comments on commit 6b8994e

Please sign in to comment.