Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function(next) {
console.log('step 0: setting up directories.');
bitcore.configFile.conf.servicesConfig.header = { slowMode: 1000 };
var dirs = bitcoinDataDirs.concat([bitcoreDataDir]);
resetDirs(dirs, function(err) {
if (err) {
return next(err);
}
writeBitcoreConf();
next();
});
},
// 1. start fake server
var writeBitcoreConf = function() {
fs.writeFileSync(bitcore.configFile.file, JSON.stringify(bitcore.configFile.conf));
};
var writeBitcoreConf = function() {
fs.writeFileSync(bitcore.configFile.file, JSON.stringify(bitcore.configFile.conf));
};
mkdirp(bitcoreDataDir, function(err) {
if(err) {
return callback(err);
}
fs.writeFileSync(bitcore.configFile.file, JSON.stringify(bitcore.configFile.conf));
var args = bitcore.args;
bitcore.process = spawn(bitcore.exec, args, bitcore.opts);
bitcore.process.stdout.on('data', function(data) {
if (debug) {
process.stdout.write(data.toString());
}
});
bitcore.process.stderr.on('data', function(data) {
if (debug) {
process.stderr.write(data.toString());
}
var writeBitcoreConf = function() {
fs.writeFileSync(bitcore.configFile.file, JSON.stringify(bitcore.configFile.conf));
};
var writeBitcoreConf = function() {
fs.writeFileSync(bitcore.configFile.file, JSON.stringify(bitcore.configFile.conf));
};
mkdirp(bitcoreDataDir, function(err) {
if(err) {
return callback(err);
}
fs.writeFileSync(bitcore.configFile.file, JSON.stringify(bitcore.configFile.conf));
var args = bitcore.args;
bitcore.process = spawn(bitcore.exec, args, bitcore.opts);
bitcore.process.stdout.on('data', function(data) {
if (debug) {
process.stdout.write(data.toString());
}
});
bitcore.process.stderr.on('data', function(data) {
if (debug) {
process.stderr.write(data.toString());