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", "name": "Litecoin",
"symbol": "doge", "symbol": "ltc",
"algorithm": "scrypt", "algorithm": "scrypt",
"reward": "POW", "reward": "POW",
"address": "nhfNedMmQ1Rjb62znwaiJgFhL3f4NQztSp", "txMessages": false,
"address": "mi4iBXbBsydtcc5yFmsff2zCFVX4XG7qJc",
"stratumPort": 3334, "stratumPort": 3334,
"difficulty": 32, "difficulty": 32,
"blockRefreshInterval": 1, "blockRefreshInterval": 1,
"daemon": { "daemon": {
"host": "localhost", "host": "localhost",
"port": 19334, "port": 19332,
"user": "testnet", "user": "litecoinrpc",
"password": "testnet" "password": "testnet"
}, },
"varDiff": { "varDiff": {
@ -22,4 +23,4 @@
"retargetTime": 120, //check to see if we should retarget every this many seconds "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 "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 fs = require('fs');
var Stratum = require('stratum-pool'); var posix = require('posix');
var Stratum = require('stratum-pool');
var PoolLogger = require('./libs/logutils.js'); var PoolLogger = require('./libs/logutils.js');
JSON.minify = JSON.minify || require("node-json-minify"); JSON.minify = JSON.minify || require("node-json-minify");
try{
posix.setrlimit('nofile', { soft: 100000 });
}
catch(e){
console.error(e);
}
var loggerInstance = new PoolLogger({ var loggerInstance = new PoolLogger({
'default': true, 'default': true,
'keys': { 'keys': {

View File

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