Skip to content
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

cmd/geth/retesteth: use canon head instead of keeping alternate count #20572

Merged
merged 1 commit into from
Jan 23, 2020

Conversation

holiman
Copy link
Contributor

@holiman holiman commented Jan 17, 2020

Retesteth was kind of illogical, when blocks were imported [1,2,3a,4,3b], it thought that 3b was the canon head (since Importblocks does not return an error if a side-block is imported).

This PR removes the separate blockNumber counter from the API, and uses the actual current head from blockchain when needed.

Requested by @winsvega , PTAL if this fixes your issues.

@winsvega
Copy link
Contributor

thanks. now it return the right head of the blockchain

@winsvega
Copy link
Contributor

winsvega commented Jan 22, 2020

aha. here is another issue.

block 4  has invalid transaction which is rejected. nonce = 3
rewind to block 2
import valid transaction with nonce = 2
mine block 3

and the mined block 3 has now 2 transactions. one with nonce 2 and the second one with nonce 3 that is now valid. but after rewind, the transaction pool should be cleaned.

@holiman holiman merged commit 0b284f6 into ethereum:master Jan 23, 2020
enriquefynn pushed a commit to enriquefynn/go-ethereum that referenced this pull request Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants