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

chore: use correct type in getAccount #10023

Merged
merged 5 commits into from
Aug 2, 2024
Merged

Conversation

mvares
Copy link
Contributor

@mvares mvares commented Aug 2, 2024

Closes #9637

@@ -8,6 +8,7 @@ use reth_codecs::{reth_codec, Compact};
use revm_primitives::{AccountInfo, Bytecode as RevmBytecode, JumpTable};
use serde::{Deserialize, Serialize};

pub use alloy_consensus::Account as AccountTrie;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sincerely, I don't think this name is idiomatic. I think we can found a better name for it 👍🏻

@mvares mvares marked this pull request as ready for review August 2, 2024 14:49
crates/primitives-traits/src/account.rs Outdated Show resolved Hide resolved
crates/primitives-traits/src/lib.rs Outdated Show resolved Hide resolved
crates/rpc/rpc-eth-api/src/core.rs Outdated Show resolved Hide resolved
@@ -250,7 +250,7 @@ pub trait EthApi {

/// Returns the account details by specifying an address and a block number/tag
#[method(name = "getAccount")]
async fn get_account(&self, address: Address, block: BlockId) -> RpcResult<Account>;
async fn get_account(&self, address: Address, block: BlockId) -> RpcResult<AccountTrie>;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
async fn get_account(&self, address: Address, block: BlockId) -> RpcResult<AccountTrie>;
async fn get_account(&self, address: Address, block: BlockId) -> RpcResult<reth_rpc_types::Account>;

@@ -626,7 +626,7 @@ where
}

/// Handler for: `eth_getAccount`
async fn get_account(&self, _address: Address, _block: BlockId) -> RpcResult<Account> {
async fn get_account(&self, _address: Address, _block: BlockId) -> RpcResult<AccountTrie> {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
async fn get_account(&self, _address: Address, _block: BlockId) -> RpcResult<AccountTrie> {
async fn get_account(&self, _address: Address, _block: BlockId) -> RpcResult<reth_rpc_types::Account> {

@mattsse
Copy link
Collaborator

mattsse commented Aug 2, 2024

only needs cargo +nightly fmt

@mattsse mattsse enabled auto-merge August 2, 2024 15:18
@mattsse mattsse added this pull request to the merge queue Aug 2, 2024
Merged via the queue into paradigmxyz:main with commit f2bb8e7 Aug 2, 2024
32 checks passed
@mvares mvares deleted the account-type branch August 2, 2024 15:54
martinezjorge pushed a commit to martinezjorge/reth that referenced this pull request Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use correct rpc account type for eth_getAccount
2 participants