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

Merge pull request #1202 from ton-blockchain/tvm-patch

Fix transaction original_balance and VmState::jump_to
This commit is contained in:
EmelyanenkoK 2024-09-23 21:10:57 +03:00 committed by GitHub
commit b78199370e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 94 additions and 70 deletions

View file

@ -1555,7 +1555,14 @@ bool Transaction::prepare_compute_phase(const ComputePhaseConfig& cfg) {
// ...
compute_phase = std::make_unique<ComputePhase>();
ComputePhase& cp = *(compute_phase.get());
original_balance -= total_fees;
if (cfg.global_version >= 9) {
original_balance = balance;
if (msg_balance_remaining.is_valid()) {
original_balance -= msg_balance_remaining;
}
} else {
original_balance -= total_fees;
}
if (td::sgn(balance.grams) <= 0) {
// no gas
cp.skip_reason = ComputePhase::sk_no_gas;