Added posix setrlimit / ulimit

This commit is contained in:
Matt 2014-02-20 16:13:50 -07:00
parent 3f048bff7e
commit 1462b6f0b3
3 changed files with 20 additions and 9 deletions

View File

@ -1,16 +1,17 @@
{
"name": "Dogecoin",
"symbol": "doge",
"name": "Litecoin",
"symbol": "ltc",
"algorithm": "scrypt",
"reward": "POW",
"address": "nhfNedMmQ1Rjb62znwaiJgFhL3f4NQztSp",
"txMessages": false,
"address": "mi4iBXbBsydtcc5yFmsff2zCFVX4XG7qJc",
"stratumPort": 3334,
"difficulty": 32,
"blockRefreshInterval": 1,
"daemon": {
"host": "localhost",
"port": 19334,
"user": "testnet",
"port": 19332,
"user": "litecoinrpc",
"password": "testnet"
},
"varDiff": {
@ -22,4 +23,4 @@
"retargetTime": 120, //check to see if we should retarget every this many seconds
"variancePercent": 20 //allow average time to very this % from target without retarget
}
}
}

13
init.js
View File

@ -1,9 +1,18 @@
var fs = require('fs');
var Stratum = require('stratum-pool');
var fs = require('fs');
var posix = require('posix');
var Stratum = require('stratum-pool');
var PoolLogger = require('./libs/logutils.js');
JSON.minify = JSON.minify || require("node-json-minify");
try{
posix.setrlimit('nofile', { soft: 100000 });
}
catch(e){
console.error(e);
}
var loggerInstance = new PoolLogger({
'default': true,
'keys': {

View File

@ -6,7 +6,8 @@
"dependencies": {
"stratum-pool": "zone117x/node-stratum",
"dateformat": "*",
"node-json-minify": "*"
"node-json-minify": "*",
"posix": "*"
},
"devDependencies": {},
"scripts": {