ldhldh commited on
Commit
ef69eb8
โ€ข
1 Parent(s): eadbc7e

Update Blockchain.py

Browse files
Files changed (1) hide show
  1. Blockchain.py +5 -1
Blockchain.py CHANGED
@@ -19,7 +19,11 @@ class Blockchain:
19
  :return: ์ƒˆ๋กœ ์ƒ์„ฑ๋œ ๋ธ”๋ก
20
  """
21
  for id, mem in self.user_gpus.items():
22
- self.user_wallets[id] += mem//2
 
 
 
 
23
 
24
  block = {
25
  'index': len(self.chain) + 1,
 
19
  :return: ์ƒˆ๋กœ ์ƒ์„ฑ๋œ ๋ธ”๋ก
20
  """
21
  for id, mem in self.user_gpus.items():
22
+ if id in self.user_wallets:
23
+ self.user_wallets[id] += mem//2
24
+ else:
25
+ self.user_wallets[id] = 10
26
+ self.user_wallets[id] += mem//2
27
 
28
  block = {
29
  'index': len(self.chain) + 1,