From db779ed9db5508c02f8a412bb36e1970bfe58b99 Mon Sep 17 00:00:00 2001 From: Federico Gimenez Date: Fri, 1 Aug 2025 19:10:24 +0200 Subject: [PATCH] fix: feature-gate std-only methods in sparse trie (#17706) --- crates/trie/sparse/src/state.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crates/trie/sparse/src/state.rs b/crates/trie/sparse/src/state.rs index 80fba640ff..c7c214a894 100644 --- a/crates/trie/sparse/src/state.rs +++ b/crates/trie/sparse/src/state.rs @@ -843,12 +843,14 @@ impl StorageTries { /// Takes the storage trie for the account from the internal `HashMap`, creating it if it /// doesn't already exist. + #[cfg(feature = "std")] fn take_or_create_trie(&mut self, account: &B256) -> SparseTrie { self.tries.remove(account).unwrap_or_else(|| self.cleared_tries.pop().unwrap_or_default()) } /// Takes the revealed paths set from the account from the internal `HashMap`, creating one if /// it doesn't exist. + #[cfg(feature = "std")] fn take_or_create_revealed_paths(&mut self, account: &B256) -> HashSet { self.revealed_paths .remove(account)