Skip to content

Commit 61a8de9

Browse files
committed
fix: parse eth SavedConfigs as HashSet
1 parent 63d1e37 commit 61a8de9

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/eth.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,17 +152,17 @@ pub struct AccessSettings {
152152
pub deny: HashSet<String>, // blacklist for access (always used)
153153
}
154154

155-
pub type SavedConfigs = Vec<ProviderConfig>;
155+
pub type SavedConfigs = HashSet<ProviderConfig>;
156156

157157
/// Provider config. Can currently be a node or a ws provider instance.
158-
#[derive(Clone, Debug, Deserialize, Serialize)]
158+
#[derive(Clone, Debug, Deserialize, Serialize, Hash, Eq, PartialEq)]
159159
pub struct ProviderConfig {
160160
pub chain_id: u64,
161161
pub trusted: bool,
162162
pub provider: NodeOrRpcUrl,
163163
}
164164

165-
#[derive(Clone, Debug, Deserialize, Serialize)]
165+
#[derive(Clone, Debug, Deserialize, Serialize, Hash, Eq, PartialEq)]
166166
pub enum NodeOrRpcUrl {
167167
Node {
168168
kns_update: crate::kernel_types::KnsUpdate,

src/kernel_types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ pub enum MessageType {
433433
Response,
434434
}
435435

436-
#[derive(Clone, Debug, Serialize, Deserialize)]
436+
#[derive(Clone, Debug, Serialize, Deserialize, Hash, Eq, PartialEq)]
437437
pub struct KnsUpdate {
438438
pub name: String, // actual username / domain name
439439
pub owner: String,

0 commit comments

Comments
 (0)