mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-17 05:21:27 +02:00
@@ -554,23 +554,19 @@ function Database(){
|
||||
This function takes the difficulty of the current block, and the last PPS block. If it's 0, save everything,
|
||||
UNLESS global.config.pps.enable is FALSE, then feel free to trash it.
|
||||
Due to LMDB under current config, we must delete entire keys, due to this, we save diff * shareMulti * 1.3
|
||||
|
||||
6/29/2017 - Fixed bug with the way the system got blocks. getLastBlock gets the most recent block.
|
||||
getOldestLockedBlock gets the oldest block in the system that's locked. This ensures that shares for that block
|
||||
can't be destroyed, and that there's enough depth past that point to ensure the system will have the ability
|
||||
to make payouts based on the shareMultiLog. Thanks suhz for finding this. Sorry it hit your aeon pool hard.
|
||||
:( -- Snipa
|
||||
|
||||
If current_height - global.payout.blocksRequired > lastLockedBlock, then set the scan start to
|
||||
current_height - global.payout.blocksRequired - 1 so that we have the full block in case of PPS.
|
||||
Otherwise, use the lastPPLNSBlock as the scan start. There we go. Stupid logic!
|
||||
|
||||
Math check!
|
||||
cur_height = 100, blocksRequired=20, lastPPLNSLockedBlock.height=90
|
||||
In this case, the functional depth required for SOLO is 80 - 1, giving us 79 as our start
|
||||
cur_height = 100, blocksRequired=20, lastPPLNSLockedBlock.height=70
|
||||
In this case, the PPLNS locked block is older than the current height - the required amount, so start is 70.
|
||||
|
||||
PPS height no longer matters! Yay!
|
||||
Solo really doesn't matter, as block finder gets everything.
|
||||
If there is no valid locked block to start from, aka all blocks are unlocked, then scan from the current height
|
||||
|
||||
Reference in New Issue
Block a user