Merge pull request #1242 from chaotixkilla/fix-machine-crash-with-disconnected-node

Fix machine crashing with disconnected nodes
This commit is contained in:
Rafael Taranto 2022-05-26 10:07:47 +01:00 committed by GitHub
commit 67e21d202f
3 changed files with 20 additions and 4 deletions

View file

@ -6,7 +6,7 @@ const { default: PQueue } = require('p-queue')
const BN = require('../../../bn')
const E = require('../../../error')
const { logger } = require('../../../blockchain/common')
const logger = require('../../../logger')
const options = require('../../../options')
const jsonRpc = require('../../common/json-rpc')
@ -40,7 +40,12 @@ function rpcConfig () {
port: cryptoRec.walletPort || cryptoRec.defaultPort
}
} catch (err) {
throw new Error('wallet is currently not installed')
logger.error('Wallet is currently not installed!')
return {
username: '',
password: '',
port: cryptoRec.walletPort || cryptoRec.defaultPort
}
}
}