Skip to content

Commit

Permalink
chain: require that new_transactions are empty (#12630)
Browse files Browse the repository at this point in the history
Based on top of #12627.
  • Loading branch information
nagisa authored Jan 14, 2025
1 parent 483a0e8 commit 8c0e9b9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions chain/chain/src/stateless_validation/chunk_validation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,11 @@ pub fn pre_validate_chunk_state_witness(
RelaxedChunkValidation,
current_protocol_version
) {
if !state_witness.new_transactions.is_empty() {
return Err(Error::InvalidChunkStateWitness(format!(
"Witness new_transactions must be empty",
)));
}
if last_chunk_block.header().is_genesis() {
vec![true; state_witness.transactions.len()]
} else {
Expand Down

0 comments on commit 8c0e9b9

Please sign in to comment.