Skip to content
This repository has been archived by the owner on Jul 5, 2024. It is now read-only.

Commit

Permalink
revert additinal to word change
Browse files Browse the repository at this point in the history
  • Loading branch information
DreamWuGit committed Jan 6, 2022
1 parent ee33983 commit 2c5bffd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions bus-mapping/src/eth_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,7 @@ pub type Hash = types::H256;
impl ToWord for Address {
fn to_word(&self) -> Word {
let mut bytes = [0u8; 32];
bytes[..Self::len_bytes()].copy_from_slice(self.as_bytes());
// convert to little endian
bytes.reverse();
bytes[32 - Self::len_bytes()..].copy_from_slice(self.as_bytes());
Word::from(bytes)
}
}
Expand Down

0 comments on commit 2c5bffd

Please sign in to comment.