Compare commits
1 Commits
c7cd30b2e0
...
b884506ac3
Author | SHA1 | Date | |
---|---|---|---|
b884506ac3 |
@ -745,7 +745,10 @@ impl BrainData {
|
|||||||
let mut operator = match self.operators.get(&req.pubkey) {
|
let mut operator = match self.operators.get(&req.pubkey) {
|
||||||
Some(o) => (*(o.value())).clone(),
|
Some(o) => (*(o.value())).clone(),
|
||||||
None => OperatorData {
|
None => OperatorData {
|
||||||
..Default::default()
|
escrow: req.escrow,
|
||||||
|
email: req.email,
|
||||||
|
banned_users: HashSet::new(),
|
||||||
|
vm_nodes: HashSet::new(),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
if req.escrow < 5000 {
|
if req.escrow < 5000 {
|
||||||
@ -758,9 +761,8 @@ impl BrainData {
|
|||||||
account.balance = account.balance + operator.escrow - req.escrow;
|
account.balance = account.balance + operator.escrow - req.escrow;
|
||||||
operator.escrow = req.escrow;
|
operator.escrow = req.escrow;
|
||||||
}
|
}
|
||||||
operator.email = req.email;
|
|
||||||
self.operators.insert(req.pubkey, operator);
|
self.operators.insert(req.pubkey, operator);
|
||||||
Ok(())
|
Err(Error::InsufficientFunds)
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn find_vm_nodes_by_operator(&self, operator_wallet: &str) -> Vec<VmNode> {
|
pub fn find_vm_nodes_by_operator(&self, operator_wallet: &str) -> Vec<VmNode> {
|
||||||
|
Loading…
Reference in New Issue
Block a user