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

Do not retranslate external messages with wrong initstate (#778)

This commit is contained in:
SpyCheese 2023-10-12 14:54:14 +03:00 committed by EmelyanenkoK
parent 866fbf936b
commit 2f8e80ef56

View file

@ -1065,6 +1065,11 @@ bool Transaction::prepare_compute_phase(const ComputePhaseConfig& cfg) {
} else if (in_msg_state.not_null()) {
unpack_msg_state(true); // use only libraries
}
if (in_msg_extern && in_msg_state.not_null() && account.addr != in_msg_state->get_hash().bits()) {
LOG(DEBUG) << "in_msg_state hash mismatch in external message";
cp.skip_reason = ComputePhase::sk_bad_state;
return true;
}
// initialize VM
Ref<vm::Stack> stack = prepare_vm_stack(cp);
if (stack.is_null()) {