fixed crypto object created before directories are generated
This commit is contained in:
		
							parent
							
								
									38bfee5344
								
							
						
					
					
						commit
						882f2e7020
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -41,10 +41,6 @@ class Core: | ||||||
|         self.blockDB = 'data/blocks.db' |         self.blockDB = 'data/blocks.db' | ||||||
|         self.blockDataLocation = 'data/blocks/' |         self.blockDataLocation = 'data/blocks/' | ||||||
|         self.addressDB = 'data/address.db' |         self.addressDB = 'data/address.db' | ||||||
|         self._utils = onionrutils.OnionrUtils(self) |  | ||||||
| 
 |  | ||||||
|         # Initialize the crypto object |  | ||||||
|         self._crypto = onionrcrypto.OnionrCrypto(self) |  | ||||||
| 
 | 
 | ||||||
|         if not os.path.exists('data/'): |         if not os.path.exists('data/'): | ||||||
|             os.mkdir('data/') |             os.mkdir('data/') | ||||||
|  | @ -52,6 +48,10 @@ class Core: | ||||||
|             os.mkdir('data/blocks/') |             os.mkdir('data/blocks/') | ||||||
|         if not os.path.exists(self.blockDB): |         if not os.path.exists(self.blockDB): | ||||||
|             self.createBlockDB() |             self.createBlockDB() | ||||||
|  |              | ||||||
|  |         self._utils = onionrutils.OnionrUtils(self) | ||||||
|  |         # Initialize the crypto object | ||||||
|  |         self._crypto = onionrcrypto.OnionrCrypto(self) | ||||||
| 
 | 
 | ||||||
|         return |         return | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue