-
Notifications
You must be signed in to change notification settings - Fork 289
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
[rpc] support for eip-1898 - support block number or hash on state-related methods #4181
Conversation
if header == nil && err != nil { | ||
return | ||
} | ||
state, err := s.hmy.BeaconChain.StateAt(header.Root()) |
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.
@rlan35 do you know why here use BeaconChain but BlockChain? what's the difference between them?
@@ -69,7 +69,7 @@ func (s *AccountAPI) AccountBalance( | |||
return nil, rosettaError | |||
} | |||
} else { | |||
balance, err = s.hmy.GetBalance(ctx, addr, blockNum) | |||
balance, err = s.hmy.GetBalance(ctx, addr, rpc.BlockNumberOrHashWithNumber(blockNum)) |
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.
@LuttyYang please help to check the change of rosetta
@peekpi can you attach rpc call result test in the PR showing we still support the old way along with the new ones |
travis_rpc_test already has some tests for the old RPC. |
Tested on mainnet archival node by block number
by blockhash inside an object
|
merge ethereum/go-ethereum#19491 to harmony.