mirror of
https://github.com/mempool/mempool.git
synced 2025-03-03 17:47:01 +01:00
Don't try to fetch cpfp if database disabled
This commit is contained in:
parent
4efabe18b1
commit
2309a769cd
1 changed files with 9 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue