Skip to content

Commit 467db6e

Browse files
Clean up unused Account and it's leftovers from the backend (paritytech#547)
* Remove useless acccount * Remove useless basic conversion Co-authored-by: dmitrylavrenov <[email protected]>
1 parent 278be3e commit 467db6e

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

frame/evm/src/backend.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,6 @@ use sha3::{Keccak256, Digest};
2828
use evm::backend::{Backend as BackendT, ApplyBackend, Apply};
2929
use crate::{AccountStorages, AccountCodes, Config, Event, Pallet};
3030

31-
#[derive(Clone, Eq, PartialEq, Encode, Decode, Default)]
32-
#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))]
33-
/// Ethereum account nonce, balance and code. Used by storage.
34-
pub struct Account {
35-
/// Account nonce.
36-
pub nonce: U256,
37-
/// Account balance.
38-
pub balance: U256,
39-
}
40-
4131
#[derive(Clone, Eq, PartialEq, Encode, Decode)]
4232
#[cfg_attr(feature = "std", derive(Debug, Serialize, Deserialize))]
4333
/// Ethereum log. Used for `deposit_event`.
@@ -117,12 +107,7 @@ impl<'vicinity, T: Config> BackendT for Backend<'vicinity, T> {
117107
}
118108

119109
fn basic(&self, address: H160) -> evm::backend::Basic {
120-
let account = Pallet::<T>::account_basic(&address);
121-
122-
evm::backend::Basic {
123-
balance: account.balance,
124-
nonce: account.nonce,
125-
}
110+
Pallet::<T>::account_basic(&address)
126111
}
127112

128113
fn code_size(&self, address: H160) -> usize {

0 commit comments

Comments
 (0)