Skip to content

Commit

Permalink
debug: fee_rate
Browse files Browse the repository at this point in the history
  • Loading branch information
DhananjayPurohit committed Jun 14, 2024
1 parent 75fe69f commit 88f035f
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions clients/libs/nodejs/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ const infoConfig = async (clientConfig, ecl) => {
const statechain_entity_url = clientConfig.statechainEntity;
const path = "info/config";

let fee_rate_btc_per_kb;
try {
fee_rate_btc_per_kb = await ecl.request('blockchain.estimatefee', [3]); // request(promise)
} catch (error) {
throw new Error("Error getting fee rate from electrum server");
}
let fee_rate_btc_per_kb = await ecl.request('blockchain.estimatefee', [3]); // request(promise)

// let fee_rate_btc_per_kb;
// try {
// fee_rate_btc_per_kb = await ecl.request('blockchain.estimatefee', [3]); // request(promise)
// } catch (error) {
// throw new Error("Error getting fee rate from electrum server");
// }

console.log("fee_rate_btc_per_kb:", fee_rate_btc_per_kb);

Expand Down

0 comments on commit 88f035f

Please sign in to comment.