lamassu-server/blockchains/zcash/local-pre-install
2017-07-06 21:56:56 +03:00

20 lines
451 B
JavaScript

#!/usr/bin/env node
const path = require('path')
const crypto = require('crypto')
const fs = require('fs')
const options = require('../../lib/options')
const blockchainDir = options.blockchainDir
const confPath = path.resolve(blockchainDir, 'zcash.conf')
const password = crypto.randomBytes(32).toString('hex')
const conf = `rpcuser=username
rpcpassword=${password}
mainnet=1
addnode=mainnet.z.cash
dbcache=500
`
fs.writeFileSync(confPath, conf)