fix bug on ==
This commit is contained in:
parent
b45f970e40
commit
7905c1c165
13
src/data.rs
13
src/data.rs
@ -180,7 +180,7 @@ impl BrainData {
|
|||||||
e
|
e
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if confirmation.error == "" {
|
if confirmation.error != "" {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let contract = Contract {
|
let contract = Contract {
|
||||||
@ -274,12 +274,17 @@ impl BrainData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn find_contracts_by_admin_pubkey(&self, admin_pubkey: &str) -> Vec<Contract> {
|
pub fn find_contracts_by_admin_pubkey(&self, admin_pubkey: &str) -> Vec<Contract> {
|
||||||
let contracts = self.contracts.read().unwrap();
|
debug!("Searching contracts for admin pubkey {admin_pubkey}");
|
||||||
contracts
|
let contracts: Vec<Contract> = self
|
||||||
|
.contracts
|
||||||
|
.read()
|
||||||
|
.unwrap()
|
||||||
.iter()
|
.iter()
|
||||||
.cloned()
|
.cloned()
|
||||||
.filter(|c| c.admin_pubkey == admin_pubkey)
|
.filter(|c| c.admin_pubkey == admin_pubkey)
|
||||||
.collect()
|
.collect();
|
||||||
|
debug!("Found {} contracts or {admin_pubkey}.", contracts.len());
|
||||||
|
contracts
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn find_contracts_by_node_pubkey(&self, node_pubkey: &str) -> Vec<Contract> {
|
pub fn find_contracts_by_node_pubkey(&self, node_pubkey: &str) -> Vec<Contract> {
|
||||||
|
Loading…
Reference in New Issue
Block a user