Problem to solve: When autoload is set to false like in blockchain-etl, the call on line 394 blows up with a function clause error because the chain is still undefined.
Solution: Defer the ledger lookup until just before the cache generation happens and do it inside of the spawn, so that if it fails, it's harmless to application start up.
Problem to solve: When
autoload
is set tofalse
like in blockchain-etl, the call on line 394 blows up with a function clause error because the chain is still undefined.Solution: Defer the ledger lookup until just before the cache generation happens and do it inside of the spawn, so that if it fails, it's harmless to application start up.