Skip to content

Commit

Permalink
Fix receipt gap brings by the genesis receipt
Browse files Browse the repository at this point in the history
Signed-off-by: linning <linningde25@gmail.com>
  • Loading branch information
NingLin-P committed Jul 19, 2024
1 parent cd624a0 commit 0de8728
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions crates/pallet-domains/src/block_tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,11 @@ pub(crate) fn execution_receipt_type<T: Config>(
}

// Add confirm to the head receipt that added in the current block or it is
// the genesis receipt
// the first genesis receipt
let is_first_genesis_receipt =
receipt_number.is_zero() && HeadDomainNumber::<T>::get(domain_id).is_zero();
if receipt_number == head_receipt_number
&& (head_receipt_extended || receipt_number.is_zero())
&& (head_receipt_extended || is_first_genesis_receipt)
{
return ReceiptType::Accepted(AcceptedReceiptType::CurrentHead);
}
Expand Down

0 comments on commit 0de8728

Please sign in to comment.