Don't try to fetch cpfp if database disabled

This commit is contained in:
Mononaut 2023-03-01 11:30:33 -06:00
parent 4efabe18b1
commit 2309a769cd
No known key found for this signature in database
GPG key ID: A3F058E41374C04E

View file

@ -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;