Skip to content

Commit

Permalink
Do not retranslate external messages with wrong initstate (#778)
Browse files Browse the repository at this point in the history
  • Loading branch information
SpyCheese authored Oct 12, 2023
1 parent 41ed354 commit cdf96a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions crypto/block/transaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit cdf96a2

Please sign in to comment.