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

Devnet Update Query #214

Merged
merged 4 commits into from
Feb 4, 2023
Merged

Devnet Update Query #214

merged 4 commits into from
Feb 4, 2023

Conversation

span14
Copy link
Collaborator

@span14 span14 commented Dec 7, 2022

Description

This PR creates a new rpc.BlockNumber type called ConfirmedBlockNumber, which serves to provide users access to the finalized block in V2.

@span14 span14 added the enhancement New feature or request label Dec 7, 2022
@span14 span14 self-assigned this Dec 7, 2022
@@ -81,6 +82,22 @@ func (b *EthApiBackend) HeaderByNumber(ctx context.Context, blockNr rpc.BlockNum
// Otherwise resolve and return the block
if blockNr == rpc.LatestBlockNumber {
return b.eth.blockchain.CurrentBlock().Header(), nil
} else if blockNr == rpc.ConfirmedBlockNumber {
if b.eth.chainConfig.XDPoS == nil {
return nil, errors.New("PoW does not support confirmed block loopup")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lookup

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix

return b.eth.blockchain.GetHeaderByHash(confirmedHash), nil
} else {
return nil, errors.New("PoS V1 does not support confirmed block loopup")
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lookup

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Copy link
Collaborator

@wjrjerome wjrjerome left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like the git commit is messed up. Your PR included a lot of my past commits.
Did you rebase or merge dev-upgrade into your branch?
Let's chat in zoom

wgr523
wgr523 previously requested changes Feb 2, 2023
Copy link
Collaborator

@wgr523 wgr523 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebase needed

@span14 span14 merged commit bd46a94 into dev-upgrade Feb 4, 2023
@liam-lai liam-lai deleted the devnet-update-query branch November 8, 2023 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
XDPoS Upgrade
Awaiting triage
Development

Successfully merging this pull request may close these issues.

None yet

4 participants