Skip to content

Commit 73be4bc

Browse files
authored
Update utxoracle.js
1 parent 7b351fb commit 73be4bc

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

src/dlc/utxoracle.js

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,9 @@ const rpcClient = bitcoin.Client(rpcConfig);
2222
const latestTimeInSeconds = block.time;
2323
const latestTimeDatetime = new Date(latestTimeInSeconds * 1000).toUTCString();
2424
const latestTimeUTC = latestTimeDatetime.slice(0, -4);
25+
const latestPriceData = await.priceData.getblockCount();
2526

2627
const yesterdayInSeconds = latestTimeInSeconds - 24 * 60 * 60;
2728
const latestPriceDate = new Date(yesterdayInSeconds * 1000).toISOString().slice(0, 10);
2829

29-
console.log(`Connected to local node at block #: ${blockCount}`);
30-
console.log(`Latest available price date is: ${latestPriceDate}`);
31-
console.log("Earliest available price date is: 2020-07-26 (full node)");
32-
33-
// Your date input logic here
34-
35-
// Rest of the code (Parts 4 to 9) would go here
36-
37-
} catch (error) {
38-
console.error("Error connecting to your node. Trouble shooting steps:\n");
39-
console.error("1) Make sure Bitcoin Core is running and reachable.");
40-
console.error("2) Make sure you have set up your Bitcoin Core RPC configuration.");
41-
console.error("3) Explore the Bitcoin Core RPC options in your JavaScript code.");
42-
console.error("\nThe error was:", error);
43-
process.exit(1);
44-
}
45-
})();
4630

0 commit comments

Comments
 (0)