Skip to content

Commit b59148e

Browse files
author
Adrian Nagy
committed
feat(graphql): preapere datloader for account type
1 parent bbb1acb commit b59148e

File tree

5 files changed

+393
-39
lines changed

5 files changed

+393
-39
lines changed

Cargo.lock

Lines changed: 222 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

node/account/src/public_key.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,3 +78,10 @@ impl fmt::Display for AccountPublicKey {
7878
write!(f, "{p2p_key}")
7979
}
8080
}
81+
82+
// for a simple hashmap or btree map use the hash of the string representation
83+
impl std::hash::Hash for AccountPublicKey {
84+
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
85+
self.to_string().hash(state);
86+
}
87+
}

node/native/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ sha3 = "0.10.8"
3535
strum = "0.26.2"
3636
strum_macros = "0.26.4"
3737
hex = { version = "0.4.3" }
38+
dataloader = "0.18"
3839

3940
openmina-core = { path = "../../core" }
4041
openmina-node-common = { path = "../common" }

0 commit comments

Comments
 (0)