From d2354063acb84571d63e4c4cd88784e677aa3a0a Mon Sep 17 00:00:00 2001 From: Matthew Little Date: Sat, 21 Jun 2014 09:20:03 -0600 Subject: [PATCH] Allow reward type to be configured in coin definition instead of auto detected --- lib/pool.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/pool.js b/lib/pool.js index 88abbbf..e2482af 100644 --- a/lib/pool.js +++ b/lib/pool.js @@ -398,10 +398,12 @@ var pool = module.exports = function pool(options, authorizeFn){ return; } - if (isNaN(rpcResults.getdifficulty) && 'proof-of-stake' in rpcResults.getdifficulty) - options.coin.reward = 'POS'; - else - options.coin.reward = 'POW'; + if (!options.coin.reward) { + if (isNaN(rpcResults.getdifficulty) && 'proof-of-stake' in rpcResults.getdifficulty) + options.coin.reward = 'POS'; + else + options.coin.reward = 'POW'; + } /* POS coins must use the pubkey in coinbase transaction, and pubkey is