-
Notifications
You must be signed in to change notification settings - Fork 149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(api): fix bug about miner.Pending call #357
Conversation
consensus/taiko/consensus.go
Outdated
} | ||
if !isAnchor { | ||
return nil, ErrAnchorTxNotFound | ||
if body.Transactions[0].IsAnchor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remembered that the function IsAnchor()
seems always to return false
?
And I think using ValidateAnchorTx
is enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok if the first tx is anchor tx.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It can't happen that the first tx in the block to be finalised is not an anchor tx, can it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new modification in this commit.
consensus/taiko/consensus.go
Outdated
} | ||
if !isAnchor { | ||
return nil, ErrAnchorTxNotFound | ||
if body.Transactions[0].IsAnchor() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The first tx in a L2 block must be an anchor
tx, so no need to check this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A new modification in this commit.
Co-authored-by: Roger <[email protected]>
Co-authored-by: Roger <[email protected]>
Co-authored-by: Roger <[email protected]>
Co-authored-by: Roger <[email protected]>
Co-authored-by: Roger <[email protected]>
Emmm is there any case we will use |
Closed due to |
Suppose the calling link contains miner/miner.go:Pending() api and
txpool.Pending
is not empty, then return error(ErrAnchorTxNotFound).