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

updated fift

updated fift
updated tonlib
This commit is contained in:
ton 2019-10-05 21:21:24 +04:00
parent 7c595294b6
commit 29deff15c3
14 changed files with 137 additions and 49 deletions

View file

@ -739,7 +739,8 @@ td::uint64 ComputePhaseConfig::gas_bought_for(td::RefInt256 nanograms) const {
}
td::RefInt256 ComputePhaseConfig::compute_gas_price(td::uint64 gas_used) const {
return td::rshift(gas_price256 * gas_used, 16, 1);
return gas_used <= flat_gas_limit ? td::make_refint(flat_gas_price)
: td::rshift(gas_price256 * (gas_used - flat_gas_limit), 16, 1) + flat_gas_price;
}
bool Transaction::compute_gas_limits(ComputePhase& cp, const ComputePhaseConfig& cfg) {