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
|
||||
);
|
||||
}
|
||||
if confirmation.error == "" {
|
||||
if confirmation.error != "" {
|
||||
return;
|
||||
}
|
||||
let contract = Contract {
|
||||
@ -274,12 +274,17 @@ impl BrainData {
|
||||
}
|
||||
|
||||
pub fn find_contracts_by_admin_pubkey(&self, admin_pubkey: &str) -> Vec<Contract> {
|
||||
let contracts = self.contracts.read().unwrap();
|
||||
contracts
|
||||
debug!("Searching contracts for admin pubkey {admin_pubkey}");
|
||||
let contracts: Vec<Contract> = self
|
||||
.contracts
|
||||
.read()
|
||||
.unwrap()
|
||||
.iter()
|
||||
.cloned()
|
||||
.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> {
|
||||
|
Loading…
Reference in New Issue
Block a user