You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.
Some apps that use blockchain-core without intending to follow the chain (e.g. the Helium miner) will receive a crash notice in blockchain_worker every 90 seconds after it attempts to start up. This is likely due to the code attempting to perform a delayed "cache pre-warm" on the local ledger, even if there is no local ledger being used.
Expected behavior
If an app has signaled to blockchain_worker that it is not a chain follower (application:get_env(blockchain, autoload) returns undefined or false), it should not attempt to pre-warm the ledger cache.
Logs
2022-12-13 17:50:21.327 1 [error] emulator@Undefined:Undefined:Undefined Error in process <0.1719.0> on node 'miner@127.0.0.1' with exit value:
{function_clause,[{blockchain,ledger,[undefined],[{file,"blockchain.erl"},{line,556}]},{blockchain_worker,'-init/1-fun-4-',0,[{file,"blockchain_worker.erl"},{line,437}]}]}
Likely source
The likely source of the issue is this section of the blockchain_worker startup, which spawns a function that eventually attempts to instantiate a ledger, regardless of whether the app is following the chain:
Summary
Some apps that use blockchain-core without intending to follow the chain (e.g. the Helium miner) will receive a crash notice in
blockchain_worker
every 90 seconds after it attempts to start up. This is likely due to the code attempting to perform a delayed "cache pre-warm" on the local ledger, even if there is no local ledger being used.Expected behavior
If an app has signaled to
blockchain_worker
that it is not a chain follower (application:get_env(blockchain, autoload)
returnsundefined
orfalse
), it should not attempt to pre-warm the ledger cache.Logs
Likely source
The likely source of the issue is this section of the
blockchain_worker
startup, which spawns a function that eventually attempts to instantiate a ledger, regardless of whether the app is following the chain:blockchain-core/src/blockchain_worker.erl
Line 435 in f71f7ef
The text was updated successfully, but these errors were encountered: