1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

Return zero instead of null in compute_storage_fees (#810)

Co-authored-by: SpyCheese <mikle98@yandex.ru>
This commit is contained in:
EmelyanenkoK 2023-11-22 15:41:02 +03:00 committed by GitHub
parent 1cffca0b40
commit 6b8994e456
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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) {