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

Fix panic when getting StakeDifficulty if dcrd disconnected #302

Merged
merged 1 commit into from
Jul 28, 2016

Conversation

cjepson
Copy link
Contributor

@cjepson cjepson commented Jul 27, 2016

Calling wallet.StakeDifficulty or wallet.StakeInfo would cause a panic if the daemon was not connected to the wallet. Now the chain client is loaded by the disconnection-safe w.requireChainClient.

@alexlyp
Copy link
Member

alexlyp commented Jul 27, 2016

utACK

@jrick
Copy link
Member

jrick commented Jul 27, 2016

ok

1 similar comment
@marcopeereboom
Copy link
Member

ok

StakeDifficulty and StakeInfo could potentially cause a panic if they
did not have a safe pointer for the chainClient. requireChainClient is
used to ensure that a nil pointer dereference never occurs.
@alexlyp
Copy link
Member

alexlyp commented Jul 27, 2016

ok on the updates as well

@jrick
Copy link
Member

jrick commented Jul 27, 2016

ok again

@alexlyp alexlyp merged commit 7be56d0 into decred:master Jul 28, 2016
beansgum pushed a commit to beansgum/dcrwallet that referenced this pull request Jun 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants