-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Support "earliest" and specific block parameters in RPC where possible #1149
Conversation
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 { |
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.
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?
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.
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.
836e2eb
to
6c5c0ad
Compare
|
||
fn make_unsupported_err() -> Error { | ||
Error { | ||
code: ErrorCode::ServerError(UNSUPPORTED_REQUEST_CODE), |
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.
Identation?
6c5c0ad
to
cd7153f
Compare
with modus ponens panickers
cd7153f
to
a272f85
Compare
It may not be possible whenever the database does any kind of pruning.