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