TLS config fix

This commit is contained in:
Mike Fluff
2019-03-06 11:01:59 +07:00
parent a08f02572f
commit 65a9541673
4 changed files with 36 additions and 35 deletions

View File

@@ -18,7 +18,8 @@ let lightning = require('../lightning');
let identity_pubkey = false;
// ###################### SMOKE TESTS ########################
bitcoinclient.request('getblockchaininfo', false, function(err, info) {
bitcoinclient.request('getinfo', false, function(err, info) {
console.log(err)
if (info && info.result && info.result.blocks) {
if (info.result.blocks < 550000) {
console.error('bitcoind is not caught up');
@@ -240,7 +241,7 @@ router.get('/balance', async function(req, res) {
}
if (!(await u.getAddress())) await u.generateAddress(); // onchain address needed further
await u.accountForPosibleTxids();
u.accountForPosibleTxids();
let balance = await u.getBalance();
res.send({ BTC: { AvailableBalance: balance } });
});
@@ -267,7 +268,7 @@ router.get('/gettxs', async function(req, res) {
if (!(await u.getAddress())) await u.generateAddress(); // onchain addr needed further
try {
await u.accountForPosibleTxids();
u.accountForPosibleTxids();
let txs = await u.getTxs();
res.send(txs);
} catch (Err) {
@@ -304,7 +305,7 @@ router.get('/getpending', async function(req, res) {
}
if (!(await u.getAddress())) await u.generateAddress(); // onchain address needed further
await u.accountForPosibleTxids();
u.accountForPosibleTxids();
let txs = await u.getPendingTxs();
res.send(txs);
});