Handle error from bitcoin client when querying prevouts
This commit is contained in:
parent
5b331c144b
commit
af0c78be81
@ -960,6 +960,7 @@ class BitcoinRoutes {
|
|||||||
unconfirmed = true;
|
unconfirmed = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
try {
|
||||||
const rawPrevout = await bitcoinClient.getTxOut(outpoint.txid, outpoint.vout, false);
|
const rawPrevout = await bitcoinClient.getTxOut(outpoint.txid, outpoint.vout, false);
|
||||||
if (rawPrevout) {
|
if (rawPrevout) {
|
||||||
prevout = {
|
prevout = {
|
||||||
@ -971,6 +972,9 @@ class BitcoinRoutes {
|
|||||||
};
|
};
|
||||||
unconfirmed = false;
|
unconfirmed = false;
|
||||||
}
|
}
|
||||||
|
} catch (e) {
|
||||||
|
// Ignore bitcoin client errors, just leave prevout as null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prevout) {
|
if (prevout) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user