mirror of
https://github.com/ton-blockchain/ton
synced 2025-03-09 15:40:10 +00:00
Fix setting original_balance in transaction.cpp
This commit is contained in:
parent
b5734d2e30
commit
e04965c400
3 changed files with 15 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue