mirror of
https://github.com/mempool/mempool.git
synced 2025-10-04 19:33:38 +02:00
Don't try to fetch cpfp if database disabled
This commit is contained in:
@@ -217,7 +217,15 @@ class BitcoinRoutes {
|
||||
res.json(cpfpInfo);
|
||||
return;
|
||||
} 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) {
|
||||
res.json(cpfpInfo);
|
||||
return;
|
||||
|
Reference in New Issue
Block a user