Merge pull request #3189 from mempool/mononaut/cpfp-db-disabled
Don't try to fetch cpfp when database is disabled
This commit is contained in:
		
						commit
						746e1bb3da
					
				@ -217,7 +217,15 @@ class BitcoinRoutes {
 | 
				
			|||||||
      res.json(cpfpInfo);
 | 
					      res.json(cpfpInfo);
 | 
				
			||||||
      return;
 | 
					      return;
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      const cpfpInfo = await transactionRepository.$getCpfpInfo(req.params.txId);
 | 
					      let cpfpInfo;
 | 
				
			||||||
 | 
					      if (config.DATABASE.ENABLED) {
 | 
				
			||||||
 | 
					        cpfpInfo = await transactionRepository.$getCpfpInfo(req.params.txId);
 | 
				
			||||||
 | 
					      } else {
 | 
				
			||||||
 | 
					        res.json({
 | 
				
			||||||
 | 
					          ancestors: []
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        return;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
      if (cpfpInfo) {
 | 
					      if (cpfpInfo) {
 | 
				
			||||||
        res.json(cpfpInfo);
 | 
					        res.json(cpfpInfo);
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user