pool: Store reward unlock height in database

master
Matt Smith 4 years ago
parent ecd8988f37
commit 48363e33f4

@ -127,6 +127,8 @@ function Coin(data){
Overkill? Sure. But that's what we do here. Overkill.
*/
this.unlockHeight = template.unlock_height;
// Set this.blob equal to the BT blob that we get from upstream.
this.blob = template.blocktemplate_blob;
this.idHash = crypto.createHash('md5').update(template.blocktemplate_blob).digest('hex');

@ -578,6 +578,7 @@ function recordShareData(miner, job, shareDiff, blockCandidate, hashHex, shareTy
global.database.storeBlock(job.height, global.protos.Block.encode({
hash: hashHex,
difficulty: blockTemplate.difficulty,
unlockHeight: blockTemplate.unlockHeight,
shares: 0,
timestamp: Date.now(),
poolType: miner.poolTypeEnum,

Loading…
Cancel
Save