Skip to content

Commit

Permalink
Merge pull request #57 from arqma/with-zmq
Browse files Browse the repository at this point in the history
Pool updates
  • Loading branch information
ArqTras authored Apr 22, 2020
2 parents 9beb9e9 + 55637fe commit 49cc21a
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src-electron/main-process/modules/pool.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,12 +626,11 @@ export class Pool {

calculateBlockTemplateParameters() {
return {wallet_address: this.config.mining.address,
reserve_size: (true || Object.keys(this.connections).length > 128) ? 8 : 1}
reserve_size: 1 }
}

addBlockAndInformMiners(data, force=false) {
try {
const uniform = true || Object.keys(this.connections).length > 128
if(data.hasOwnProperty("error")) {
logger.log("error", "Error polling get_block_template %j", [data.error.message])
return data.error.message
Expand All @@ -640,9 +639,9 @@ export class Pool {

if(this.blocks == null || this.blocks.current == null || this.blocks.current.height < block.height || force) {

logger.log("info", "New block to mine { address: %s, height: %d, difficulty: %d, uniform: %s }", [this.address_abbr, block.height, block.difficulty, uniform])
logger.log("info", "New block to mine { address: %s, height: %d, difficulty: %d, uniform: %s }", [this.address_abbr, block.height, block.difficulty, true])
this.sendStatus(2)
this.blocks.current = new Block(this, block, uniform)
this.blocks.current = new Block(this, block, false)

this.blocks.valid.push(this.blocks.current)

Expand Down

0 comments on commit 49cc21a

Please sign in to comment.