lamassu-server/lib/blockchain/zcash.js
Neal Conner 28979e475c Update Zcash and Litecoin (#85)
* Update Zcash to 1.0.12

* Update zcash version in common.js

* Update geth in common.js

* Fix geth dir

* Update litecoin to 0.14.2

* Update litecoin to 0.14.2

* Insert disabledeprecation flag for zcashd

* Add -disabledeprecation=1.0.12

* Remove sed from zcash install.sh
2017-11-11 23:58:35 +00:00

34 lines
914 B
JavaScript

const path = require('path')
const coinUtils = require('../coin-utils')
const common = require('./common')
module.exports = {setup}
const es = common.es
const logger = common.logger
function setup (dataDir) {
es('sudo apt-get update')
es('sudo apt-get install libgomp1 -y')
const coinRec = coinUtils.getCryptoCurrency('ZEC')
common.firewall([coinRec.defaultPort])
logger.info('Fetching Zcash proofs, will take a while...')
es('zcash-fetch-params 2>&1')
logger.info('Finished fetching proofs.')
const config = buildConfig()
common.writeFile(path.resolve(dataDir, coinRec.configFile), config)
const cmd = `/usr/local/bin/${coinRec.daemon} -datadir=${dataDir} -disabledeprecation=1.0.12`
common.writeSupervisorConfig(coinRec, cmd)
}
function buildConfig () {
return `mainnet=1
addnode=mainnet.z.cash
rpcuser=lamassuserver
rpcpassword=${common.randomPass()}
dbcache=500
keypool=10000`
}