Skip to content

Commit

Permalink
state_witness: require that new_transactions are empty
Browse files Browse the repository at this point in the history
  • Loading branch information
nagisa committed Jan 14, 2025
1 parent fd4f44e commit f53831d
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 f53831d

Please sign in to comment.