From 390c681e7a687e43e724be3b072945320b5febac Mon Sep 17 00:00:00 2001 From: Dino Pacandi Date: Wed, 27 Mar 2024 16:31:22 +0100 Subject: [PATCH 1/2] used_addresses_h160 getter for the precompile set --- precompiles/src/precompile_set.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/precompiles/src/precompile_set.rs b/precompiles/src/precompile_set.rs index ebe2d11cfd..aa0f063656 100644 --- a/precompiles/src/precompile_set.rs +++ b/precompiles/src/precompile_set.rs @@ -1087,15 +1087,17 @@ impl PrecompileSetBuilder } } - /// Return the list of addresses contained in this PrecompileSet. + /// Return the list of mapped addresses contained in this PrecompileSet. pub fn used_addresses() -> impl Iterator { - Self::new() - .inner - .used_addresses() - .into_iter() + Self::used_addresses_h160() .map(R::AddressMapping::into_account_id) } + /// Return the list of H160 addresses contained in this PrecompileSet. + pub fn used_addresses_h160() -> impl Iterator { + Self::new().inner.used_addresses().into_iter() + } + pub fn summarize_checks(&self) -> Vec { self.inner.summarize_checks() } From 103250b0b17aa5808ea18a41929912231f97fe55 Mon Sep 17 00:00:00 2001 From: Dino Pacandi Date: Wed, 27 Mar 2024 16:35:06 +0100 Subject: [PATCH 2/2] Formating --- precompiles/src/precompile_set.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/precompiles/src/precompile_set.rs b/precompiles/src/precompile_set.rs index aa0f063656..7c29486c41 100644 --- a/precompiles/src/precompile_set.rs +++ b/precompiles/src/precompile_set.rs @@ -1089,14 +1089,13 @@ impl PrecompileSetBuilder /// Return the list of mapped addresses contained in this PrecompileSet. pub fn used_addresses() -> impl Iterator { - Self::used_addresses_h160() - .map(R::AddressMapping::into_account_id) + Self::used_addresses_h160().map(R::AddressMapping::into_account_id) } /// Return the list of H160 addresses contained in this PrecompileSet. pub fn used_addresses_h160() -> impl Iterator { - Self::new().inner.used_addresses().into_iter() - } + Self::new().inner.used_addresses().into_iter() + } pub fn summarize_checks(&self) -> Vec { self.inner.summarize_checks()