-
Notifications
You must be signed in to change notification settings - Fork 59
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
Devnet Update Query #214
Conversation
eth/api_backend.go
Outdated
@@ -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") |
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.
Lookup
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.
Fix
return b.eth.blockchain.GetHeaderByHash(confirmedHash), nil | ||
} else { | ||
return nil, errors.New("PoS V1 does not support confirmed block loopup") | ||
} |
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.
Lookup
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.
Fixed
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 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
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.
rebase needed
d9e6a9a
to
5aff0d3
Compare
Description
This PR creates a new
rpc.BlockNumber
type calledConfirmedBlockNumber
, which serves to provide users access to the finalized block in V2.