mirror of
https://github.com/jwinterm/nodejs-pool.git
synced 2026-10-19 05:38:35 +02:00
Adding todos to re-implement coin functions within the coins/coin.js file.
This commit is contained in:
@@ -16,6 +16,7 @@ let lastBlock = 0;
|
||||
let balanceIDCache = {};
|
||||
let blockScannerTask;
|
||||
let blockQueue = async.queue(function (task, callback) {
|
||||
// Todo: Implement within the coins/<coin>.js file.
|
||||
global.support.rpcDaemon('getblockheaderbyheight', {"height": task.blockID}, function (body) {
|
||||
let blockData = body.result.block_header;
|
||||
if (blockData.hash in blockHexCache) {
|
||||
@@ -397,9 +398,11 @@ function blockUnlocker() {
|
||||
}
|
||||
debug("Running block unlocker");
|
||||
let blockList = global.database.getValidLockedBlocks();
|
||||
// Todo: Implement within the coins/<coin>.js file.
|
||||
global.support.rpcDaemon('getlastblockheader', [], function (body) {
|
||||
let blockHeight = body.result.block_header.height;
|
||||
blockList.forEach(function (row) {
|
||||
// Todo: Implement within the coins/<coin>.js file.
|
||||
global.support.rpcDaemon('getblockheaderbyheight', {"height": row.height}, function (body) {
|
||||
if (body.result.block_header.hash !== row.hash) {
|
||||
global.database.invalidateBlock(row.height);
|
||||
|
||||
Reference in New Issue
Block a user