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 a bug relating to relevantTx handling and uncaught error #103

Merged
merged 1 commit into from
Mar 16, 2016

Conversation

cjepson
Copy link
Contributor

@cjepson cjepson commented Mar 10, 2016

A call to UnspentOutpoints did not have error handling, which was
added.

A restrictive switch statement would cause all outputs that were not
either pay-to-pubkey hash or pay-to-script-hash multisig to be stored.
This was reverted to the same behavior as btcwallet where all outputs
are stored if the address is found in the address manager. Code
handling multisignature redeemScript lookup in outputs was also
corrected.

if err == nil {
sa, ok := scrAddr.(waddrmgr.ManagedScriptAddress)
if !ok {
log.Warnf("address %v is not a script"+
Copy link
Member

Choose a reason for hiding this comment

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

If this actually happens, it will panic below where it dereferences sa (both in the log, and when it fetches the retrievedScript in the non-error path).

A call to UnspentOutpoints did not have error handling, which was
added.

A restrictive switch statement would cause all outputs that were not
either pay-to-pubkey hash or pay-to-script-hash multisig to be stored.
This was reverted to the same behavior as btcwallet where all outputs
are stored if the address is found in the address manager. Code
handling multisignature redeemScript lookup in outputs was also
corrected.
@alexlyp
Copy link
Member

alexlyp commented Mar 16, 2016

tACK

@alexlyp alexlyp merged commit 423bd7f into decred:master Mar 16, 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.

None yet

4 participants