made particles more efficient, finished basic blocks feed
This commit is contained in:
		
							parent
							
								
									dafa4b6117
								
							
						
					
					
						commit
						34416c07fe
					
				
					 8 changed files with 132 additions and 38 deletions
				
			
		|  | @ -57,9 +57,14 @@ def stream_tor_circuits(): | |||
| def stream_recent_blocks(): | ||||
|     def _compile_json(b_list): | ||||
|         js = {} | ||||
|         block_obj = None | ||||
|         for block in b_list: | ||||
|             js[block] = Block(block).btype | ||||
|         return ujson.dumps(js, reject_bytes=True) | ||||
|             block_obj = Block(block) | ||||
|             if block_obj.isEncrypted: | ||||
|                 js[block] = 'encrypted' | ||||
|             else: | ||||
|                 js[block] = Block(block).btype | ||||
|         return ujson.dumps({"blocks": js}, reject_bytes=True) | ||||
| 
 | ||||
|     def _stream_recent(): | ||||
|         last_time = Path(block_meta_db).stat().st_ctime | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue