Skip to content

Commit

Permalink
fix bug about eth_getBlockTransactionCountByNumber
Browse files Browse the repository at this point in the history
  • Loading branch information
mask-pp committed Dec 2, 2024
1 parent fdd905a commit 0c42b1a
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions consensus/taiko/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,14 @@ func (t *Taiko) FinalizeAndAssemble(chain consensus.ChainHeaderReader, header *t

// Verify anchor transaction
if len(body.Transactions) != 0 { // Transactions list might be empty when building empty payload.
isAnchor, err := t.ValidateAnchorTx(body.Transactions[0], header)
if err != nil {
return nil, err
}
if !isAnchor {
return nil, ErrAnchorTxNotFound
if body.Transactions[0].IsAnchor() {
isAnchor, err := t.ValidateAnchorTx(body.Transactions[0], header)
if err != nil {
return nil, err
}
if !isAnchor {
return nil, ErrAnchorTxNotFound
}
}
}

Expand Down

0 comments on commit 0c42b1a

Please sign in to comment.