Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for valid rpc provider during func init #3791

Open
tjayrush opened this issue Jun 14, 2024 · 0 comments
Open

Check for valid rpc provider during func init #3791

tjayrush opened this issue Jun 14, 2024 · 0 comments

Comments

@tjayrush
Copy link
Member

There's always been confusion in the code about where the first call to the RPC provider happens. This causes errors because most regular users don't edit the config file to point to a valid RPC endpoint (which is set to http://localhost:8545 by default). Instead of a meaningful message, they get a very odd message complaining about the Unchained Index not existing.

There are multiple attempts in various places to try to fix this, but I don't feel that it's ever really been fixed.

Here's one such attempt that didn't work for some reason: https://github.com/TrueBlocks/trueblocks-core/blob/master/src/apps/chifra/internal/globals/validate.go#L31.

Here's the current best version of solving the problem: https://github.com/TrueBlocks/trueblocks-core/blob/master/src/apps/chifra/pkg/config/config.go#L242

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant