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
invalid transaction hashes crashes btcwallet #405
Conversation
Thanks for spotting this. You're right that TxDetails will return a nil transaction and a nil error when the transaction is not found. Since the error case is handled by returning "not found" to the caller, could you first check that the error is not nil, and encode the error to a string to report the error, and then check if txDetails is nil after the error check? |
separated the error messages based on your feedback. I basically copied the error text from another place in the code that did that same check |
Minor style nitpick: can you split the string over several lines (concatenating them with +) so this fits in under 80 columns? FWIW this is not my preferred style and I admit to breaking it in some places for practical reasons (like the rpcserver package) but here there's no real reason not to keep it similar to the surrounding code. After that is changed, this gets my OK. |
no problem. I fixed it, and squashed the commits |
Looks like you need to run go fmt on it. |
|
While here, go ahead and update all of the decred deps, and go-spew. This is required to pull in a change to dcrjson. Refs btcsuite#405.
While here, go ahead and update all of the decred deps, and go-spew. This is required to pull in a change to dcrjson. Refs btcsuite#405.
While here, go ahead and update all of the decred deps, and go-spew. This is required to pull in a change to dcrjson. Refs btcsuite#405.
While here, go ahead and update all of the decred deps, and go-spew. This is required to pull in a change to dcrjson. Refs btcsuite#405.
While here, go ahead and update all of the decred deps, and go-spew. This is required to pull in a change to dcrjson. Refs btcsuite#405.
While here, go ahead and update all of the decred deps, and go-spew. This is required to pull in a change to dcrjson. Refs btcsuite#405.
this is for issue #404