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

[Bug][RPC] Guard RPC server during warm-up #1909

Merged
merged 2 commits into from
Oct 11, 2020

Conversation

random-zebra
Copy link

Problem:
Most RPC commands crash the wallet during the initialization phase.

Solution:
An attempt to fix this specifically for getinfo was made in #543, checking the existence of chainActive.Tip().
A better solution, instead of checking all places that try to access the block index, (or the chainstate, or the second layer maps, etc...), is to throw a JSON-RPC exception with any call, if the server is still in warm-up phase (returning the exact init message), directly from CRPCTable::execute.

Closes #1908

@random-zebra random-zebra added this to the 5.0.0 milestone Oct 10, 2020
@random-zebra random-zebra self-assigned this Oct 10, 2020
@random-zebra random-zebra added Startup Wallet startup changes and/or improvements Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes labels Oct 10, 2020
Copy link

@furszy furszy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ACK 1947519

Copy link
Collaborator

@Fuzzbawls Fuzzbawls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 1947519

@random-zebra random-zebra merged commit 48e3c91 into PIVX-Project:master Oct 11, 2020
@random-zebra random-zebra removed the Needs Release Notes Placeholder tag for anything needing mention in the "Notable Changes" section of release notes label Jan 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug RPC Startup Wallet startup changes and/or improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PIVX daemon get killed when command is casted during the initial wallet loading phase
3 participants