İçeriğe geç

Haşimoğlu Tarım Makineleri

Ethereum: Why this piece of NodeJs code has given a BSOD on Win7?

Ethereum: Understanding Windows 7’s BSOD mysteries

As a developer with Node.js blockchains, it is not uncommon to face problems with memory management and resource allocation. In this article, we will deepen the code fragment that led to the bluescreen “Bad_pool_caller” in Windows 7 and investigate why this code causes problems.

Code Fragment

Here’s that code:

`Javascript

Const Web3 = Requirement (‘Web3’);

// Create a new copy of Ethereum

Const web3 = new web3 (new web3.providers.httpprovider (

));;

`

problem

After analyzing this code, it is clear that the Web3 s sample tries to create an http provider of the live network provider. However, this process involves calling the feature “Create

problem

The problem arises when the method is called web3.createPool () when he tries to create a http pool using the supplier’s prefabricated copy. This leads to memory leakage and later causes the blues display “Bad_pool_caller” in Windows 7.

Why the code causes bsods

When the code fragment tries to share the pool memory, Node.JS throws a mistake because other processes already have memory. Particularly:

  • Method web3.createPool () trying to create a new swimming pool using a supplier’s advance payment (new web3.providers.httpprovider (…) ).

2.

Decisions

Ethereum: Why this piece of NodeJs code has given a BSOD on Win7?

To solve this problem, you can try the following:

  • Create a separate process for each Ethereum network : You can create a new process for every living network supplier for this process.

Javascript

Const Web3 = Requirement (‘Web3’);

// Create a new connection to HTTP Pool in a separate process

Const execpath = ‘C: \ program files \ node.js \ node.exe’;

Const projectdir = __dirname;

Process.execpath = $ {projectdir}/$ {exectath};

New web3.providers.httpprovider (

) .createePool ((error, pool) => {

Console.log;

});

`

  • Create a different method of http journalist: web3.creathehyperspace () and then create an HTTP provider, you can use the designer web3.providers.httpprovider.

Javascript

Const Web3 = Requirement (‘Web3’);

Const provider = new web3.providers.httpprovider (

)

// Create a new copy of Ethereum

Const Web3 = New Web3 (Supplier);

`

conclusion

“Bad_pool_caller” Bluescreen in Windows 7 may result in memory leaks in Blockchain, developed with Node.JS. By understanding a problem -causing code fragment, developers can take action to solve this problem and create more stable Blockchain applications. Be sure to always create separate processes or use alternative methods to avoid memory leaks and prevent BSOD.

Refulation

Note that Microsoft does not support the creation of the Live Ethereum network in Windows 7 and that it can be changed. Always check your application compatibility before enabled it in production environments.

Bir yanıt yazın

E-posta adresiniz yayınlanmayacak. Gerekli alanlar * ile işaretlenmişlerdir