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
367 stars 611 forks source link

Fix the blockUnlocker.js from crashing #733

Closed StarlightJS closed 9 months ago

StarlightJS commented 9 months ago

When using async@3.2.0 it gives you the following error:

TypeError: blocks.map is not a function                                                                                                                                     
    at /root/cryptonote-nodejs-pool/lib/blockUnlocker.js:120:31                                                                                                               
    at nextTask (/root/cryptonote-nodejs-pool/node_modules/async/dist/async.js:5791:27) 
    at next (/root/cryptonote-nodejs-pool/node_modules/async/dist/async.js:5799:13)                                                                                           
    at /root/cryptonote-nodejs-pool/node_modules/async/dist/async.js:329:20             
    at /root/cryptonote-nodejs-pool/lib/blockUnlocker.js:113:5                          
    at /root/cryptonote-nodejs-pool/node_modules/async/dist/async.js:2962:29                                                                                                  
    at wrapper (/root/cryptonote-nodejs-pool/node_modules/async/dist/async.js:273:20)                                                                                         
    at iteratorCallback (/root/cryptonote-nodejs-pool/node_modules/async/dist/async.js:501:17)
    at /root/cryptonote-nodejs-pool/node_modules/async/dist/async.js:329:20             
    at /root/cryptonote-nodejs-pool/node_modules/async/dist/async.js:2959:17                                                                                                  
    at /root/cryptonote-nodejs-pool/lib/blockUnlocker.js:104:6                                                                                                                
    at /root/cryptonote-nodejs-pool/lib/apiInterfaces.js:65:3                                                                                                                 
    at IncomingMessage.<anonymous> (/root/cryptonote-nodejs-pool/lib/apiInterfaces.js:41:5)
    at IncomingMessage.emit (events.js:412:35)                                        
    at endReadableNT (internal/streams/readable.js:1333:12)                                                                                                                 
    at processTicksAndRejections (internal/process/task_queues.js:82:21)

Changing the async version to async@1.5.2 fixes this issues. It's either this solution or fix the code for async@3.2.0 support.