fix: conditional check (#14616)

This commit is contained in:
Matthias Seitz
2025-02-20 17:26:32 +01:00
committed by GitHub
parent 72210736ad
commit c4066b0410

View File

@ -113,9 +113,9 @@ where
.map_err(|_| header_not_found())?
.ok_or_else(header_not_found)?;
// check condition against header
if !condition.has_exceeded_block_number(header.header().number()) ||
!condition.has_exceeded_timestamp(header.header().timestamp())
// Ensure that the condition can still be met by checking the max bounds
if condition.has_exceeded_block_number(header.header().number()) ||
condition.has_exceeded_timestamp(header.header().timestamp())
{
return Err(TxConditionalErr::InvalidCondition.into());
}