mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
chore: Patch revm to current head commit (#5109)
Co-authored-by: clabby <ben@clab.by> Co-authored-by: rakita <dragan0rakita@gmail.com>
This commit is contained in:
@@ -72,7 +72,7 @@ impl<DB: StateProvider> Database for StateProviderDatabase<DB> {
|
||||
impl<DB: StateProvider> DatabaseRef for StateProviderDatabase<DB> {
|
||||
type Error = <Self as Database>::Error;
|
||||
|
||||
fn basic(&self, address: Address) -> Result<Option<AccountInfo>, Self::Error> {
|
||||
fn basic_ref(&self, address: Address) -> Result<Option<AccountInfo>, Self::Error> {
|
||||
Ok(self.0.basic_account(address)?.map(|account| AccountInfo {
|
||||
balance: account.balance,
|
||||
nonce: account.nonce,
|
||||
@@ -81,7 +81,7 @@ impl<DB: StateProvider> DatabaseRef for StateProviderDatabase<DB> {
|
||||
}))
|
||||
}
|
||||
|
||||
fn code_by_hash(&self, code_hash: B256) -> Result<Bytecode, Self::Error> {
|
||||
fn code_by_hash_ref(&self, code_hash: B256) -> Result<Bytecode, Self::Error> {
|
||||
let bytecode = self.0.bytecode_by_hash(code_hash)?;
|
||||
|
||||
if let Some(bytecode) = bytecode {
|
||||
@@ -91,13 +91,13 @@ impl<DB: StateProvider> DatabaseRef for StateProviderDatabase<DB> {
|
||||
}
|
||||
}
|
||||
|
||||
fn storage(&self, address: Address, index: U256) -> Result<U256, Self::Error> {
|
||||
fn storage_ref(&self, address: Address, index: U256) -> Result<U256, Self::Error> {
|
||||
let index = B256::new(index.to_be_bytes());
|
||||
let ret = self.0.storage(address, index)?.unwrap_or_default();
|
||||
Ok(ret)
|
||||
}
|
||||
|
||||
fn block_hash(&self, number: U256) -> Result<B256, Self::Error> {
|
||||
fn block_hash_ref(&self, number: U256) -> Result<B256, Self::Error> {
|
||||
// Note: this unwrap is potentially unsafe
|
||||
Ok(self.0.block_hash(number.try_into().unwrap())?.unwrap_or_default())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user