dvandal / cryptonote-nodejs-pool

Mining pool for all CryptoNote based coins using Cryptonight, Cryptonight Light and Cryptonight Heavy algorithms
GNU General Public License v2.0
364 stars 610 forks source link

blocks.map is not a function #666

Open SoapyFresh opened 3 years ago

SoapyFresh commented 3 years ago

Using latest node version 12.21.0 The pool is finding blocks, but gets this error after receiving enough confirmations.

TypeError: blocks.map is not a function at /home/pool/newpool/pool/lib/blockUnlocker.js:120:31 at nextTask (/home/pool/newpool/pool/node_modules/async/dist/async.js:4576:27) at next (/home/pool/newpool/pool/node_modules/async/dist/async.js:4584:13) at /home/pool/newpool/pool/node_modules/async/dist/async.js:321:20 at /home/pool/newpool/pool/lib/blockUnlocker.js:113:5 at /home/pool/newpool/pool/node_modules/async/dist/async.js:2420:29 at wrapper (/home/pool/newpool/pool/node_modules/async/dist/async.js:268:20) at iteratorCallback (/home/pool/newpool/pool/node_modules/async/dist/async.js:493:17) at /home/pool/newpool/pool/node_modules/async/dist/async.js:321:20 at /home/pool/newpool/pool/node_modules/async/dist/async.js:2417:17 at /home/pool/newpool/pool/lib/blockUnlocker.js:104:6 at /home/pool/newpool/pool/lib/apiInterfaces.js:66:3 at IncomingMessage. (/home/pool/newpool/pool/lib/apiInterfaces.js:41:5) at IncomingMessage.emit (events.js:326:22) at endReadableNT (_stream_readable.js:1241:12) at processTicksAndRejections (internal/process/task_queues.js:84:21)

element0355 commented 3 years ago

Also having the same issue. Did you find a fix?

SoapyFresh commented 3 years ago

Also having the same issue. Did you find a fix?

No I have not!

element0355 commented 3 years ago

I found a temporary solution. In v2.0 config.json I set the unlocker enable to false. I then had a copy of v1.3.5. I installed that in a separate folder. I then copied config.json and /lib/blockUnlocker.js from v2.0 to v1.3.5 folder. Set the unlocker enable true and then ran node init.js -module=unlocker in v1.3.5, and ran the pool as normal in v2.0 folder. It seems to being working, it is unlocking the blocks and updating pending payments for my miners.

StarlightJS commented 6 months ago

The solution that really worked for me is to change the package async in package.json to 1.5.2.

Happy mining everyone!