Skip to content

Commit b7d4970

Browse files
authored
chore: aggregate PRs (#11959)
This PR aggregates changes from the following PRs: - Closes #11957 by @\MozirDmitriy - Closes #11954 by @\anim001k - Closes #11953 by @\strmfos
1 parent f40bfca commit b7d4970

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

crates/anvil/src/eth/backend/db.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,14 @@ impl<T: DatabaseRef<Error = DatabaseError> + Debug> MaybeFullDatabase for CacheD
256256
}
257257

258258
fn read_as_state_snapshot(&self) -> StateSnapshot {
259-
let db_accounts = self.cache.accounts.clone();
260259
let mut accounts = HashMap::default();
261260
let mut account_storage = HashMap::default();
262261

263-
for (addr, acc) in db_accounts {
264-
account_storage.insert(addr, acc.storage.clone());
265-
let mut info = acc.info;
262+
for (addr, acc) in &self.cache.accounts {
263+
account_storage.insert(*addr, acc.storage.clone());
264+
let mut info = acc.info.clone();
266265
info.code = self.cache.contracts.get(&info.code_hash).cloned();
267-
accounts.insert(addr, info);
266+
accounts.insert(*addr, info);
268267
}
269268

270269
let block_hashes = self.cache.block_hashes.clone();

crates/chisel/src/solidity_helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ impl Default for SolidityHelper {
5151

5252
impl fmt::Debug for SolidityHelper {
5353
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
54-
let this = self.inner.borrow_mut();
54+
let this = self.inner.borrow();
5555
f.debug_struct("SolidityHelper")
5656
.field("errored", &this.errored)
5757
.field("do_paint", &this.do_paint)

npm/src/const.ts

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,8 @@ export type Platform = Extract<
1616
'darwin' | 'linux' | 'win32'
1717
>
1818

19-
/**
20-
* foundry doesn't ship arm64 binaries for windows
21-
*/
22-
export type ArchitecturePlatform = Exclude<
23-
`${Platform}-${Architecture}`,
24-
'win32-arm64'
25-
>
19+
// Note: we intentionally don't export a combined `Platform-Architecture` alias here,
20+
// since only specific pairs are supported (see `BINARY_DISTRIBUTION_PACKAGES`).
2621

2722
export const BINARY_DISTRIBUTION_PACKAGES = {
2823
darwin: {

npm/src/install.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ function extractFileFromTarball(
105105
if (fileName === filepath)
106106
return tarballBuffer.subarray(offset, offset + fileSize)
107107

108-
// Clamp offset to the uppoer multiple of 512
108+
// Clamp offset to the upper multiple of 512
109109
offset = (offset + fileSize + 511) & ~511
110110
}
111111
throw new Error(`File ${filepath} not found in tarball`)

0 commit comments

Comments
 (0)