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 GitHub
parent 41ed354b9f
commit cdf96a21d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1084,6 +1084,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()) {