Skip to content
This repository has been archived by the owner on Nov 6, 2020. It is now read-only.

Support "earliest" and specific block parameters in RPC where possible #1149

Merged
merged 10 commits into from
May 27, 2016

Conversation

rphmeier
Copy link
Contributor

@rphmeier rphmeier commented May 26, 2016

It may not be possible whenever the database does any kind of pruning.

fn nonce(&self, address: &Address, id: BlockID) -> Option<U256>;

/// Get address nonce at the latest block's state.
fn nonce_latest(&self, address: &Address) -> U256 {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think the most common case is to use nonce_latest which should stay nonce imho.

Can we have nonce_at_block or sth like this instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is how I had it initially, but I found that the breakage caused by the change in signature was actually very small in reality. State::nonce and Miner::nonce are unchanged, and this is where most code actually looks for nonces.

@arkpar arkpar closed this May 26, 2016
@arkpar arkpar reopened this May 26, 2016
@arkpar arkpar added the A8-looksgood 🦄 Pull request is reviewed well. label May 27, 2016

fn make_unsupported_err() -> Error {
Error {
code: ErrorCode::ServerError(UNSUPPORTED_REQUEST_CODE),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Identation?

@tomusdrw tomusdrw added A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. and removed A8-looksgood 🦄 Pull request is reviewed well. labels May 27, 2016
@tomusdrw tomusdrw added A8-looksgood 🦄 Pull request is reviewed well. and removed A5-grumble 🔥 Pull request has minor issues that must be addressed before merging. labels May 27, 2016
@arkpar arkpar merged commit 72031d6 into openethereum:master May 27, 2016
@rphmeier rphmeier mentioned this pull request Jun 2, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A8-looksgood 🦄 Pull request is reviewed well.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants