Merge pull request #1765 from mempool/simon/init-data-fees
Send fee info with init data
This commit is contained in:
		
						commit
						9ab3b3293a
					
				| @ -200,6 +200,7 @@ class WebsocketHandler { | |||||||
|       'backendInfo': backendInfo.getBackendInfo(), |       'backendInfo': backendInfo.getBackendInfo(), | ||||||
|       'loadingIndicators': loadingIndicators.getLoadingIndicators(), |       'loadingIndicators': loadingIndicators.getLoadingIndicators(), | ||||||
|       'da': difficultyAdjustment.getDifficultyAdjustment(), |       'da': difficultyAdjustment.getDifficultyAdjustment(), | ||||||
|  |       'fees': feeApi.getRecommendedFee(), | ||||||
|       ...this.extraInitProperties |       ...this.extraInitProperties | ||||||
|     }; |     }; | ||||||
|   } |   } | ||||||
| @ -403,6 +404,9 @@ class WebsocketHandler { | |||||||
|       block.extras.matchRate = matchRate; |       block.extras.matchRate = matchRate; | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     const da = difficultyAdjustment.getDifficultyAdjustment(); | ||||||
|  |     const fees = feeApi.getRecommendedFee(); | ||||||
|  | 
 | ||||||
|     this.wss.clients.forEach((client) => { |     this.wss.clients.forEach((client) => { | ||||||
|       if (client.readyState !== WebSocket.OPEN) { |       if (client.readyState !== WebSocket.OPEN) { | ||||||
|         return; |         return; | ||||||
| @ -415,8 +419,8 @@ class WebsocketHandler { | |||||||
|       const response = { |       const response = { | ||||||
|         'block': block, |         'block': block, | ||||||
|         'mempoolInfo': memPool.getMempoolInfo(), |         'mempoolInfo': memPool.getMempoolInfo(), | ||||||
|         'da': difficultyAdjustment.getDifficultyAdjustment(), |         'da': da, | ||||||
|         'fees': feeApi.getRecommendedFee(), |         'fees': fees, | ||||||
|       }; |       }; | ||||||
| 
 | 
 | ||||||
|       if (mBlocks && client['want-mempool-blocks']) { |       if (mBlocks && client['want-mempool-blocks']) { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user