mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 17:48:03 -05:00
fix: use DatabaseRef impl when fetching overriden account (#3589)
Co-authored-by: Roman Krasiuk <rokrassyuk@gmail.com>
This commit is contained in:
@@ -459,7 +459,9 @@ where
|
||||
DB: DatabaseRef,
|
||||
EthApiError: From<<DB as DatabaseRef>::Error>,
|
||||
{
|
||||
let mut account_info = db.basic(account)?.unwrap_or_default();
|
||||
// we need to fetch the account via the `DatabaseRef` to not update the state of the account,
|
||||
// which is modified via `Database::basic`
|
||||
let mut account_info = DatabaseRef::basic(db, account)?.unwrap_or_default();
|
||||
|
||||
if let Some(nonce) = account_override.nonce {
|
||||
account_info.nonce = nonce.as_u64();
|
||||
|
||||
Reference in New Issue
Block a user