Skip to content

Commit

Permalink
Add new config.blockUnlocker.fixBlockHeightRPC (true/false) setting t…
Browse files Browse the repository at this point in the history
…o fix orphaned block issue with some coins, see: forknote/forknote-pool#48
  • Loading branch information
dvandal committed May 15, 2018
1 parent 38b10fb commit e9036c1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/blockUnlocker.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function runInterval(){
// Check if blocks are orphaned
function(blocks, callback){
async.filter(blocks, function(block, mapCback){
apiInterfaces.rpcDaemon('getblockheaderbyheight', {height: block.height}, function(error, result){
apiInterfaces.rpcDaemon('getblockheaderbyheight', {height: (config.blockUnlocker.fixBlockHeightRPC ? block.height + 1 : block.height)}, function(error, result){
if (error){
log('error', logSystem, 'Error with getblockheaderbyheight RPC request for block %s - %j', [block.serialized, error]);
block.unlocked = false;
Expand Down

0 comments on commit e9036c1

Please sign in to comment.