-
Notifications
You must be signed in to change notification settings - Fork 11
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
Added blockhash argument to getrawtransaction api #39
base: master
Are you sure you want to change the base?
Conversation
Have you tested to retrieve the whitepaper with a Spectrum connection? |
Yeah, I tested. It's failing on mine maybe because I haven't added any device, but I feel it's close. Have a look |
You don't need any device for this feature. |
I don't understand why it does not recognise the fourth argument block hash despite adding it. |
if verbose: | ||
return self.sock.call("blockchain.transaction.get", [txid, True]) | ||
if blockhash: | ||
if verbose: | ||
return self.sock.call("blockchain.transaction.get", [txid, True, blockhash]) | ||
else: | ||
return self.sock.call("blockchain.transaction.get", [txid, False, blockhash]) | ||
else: | ||
return self.sock.call("blockchain.transaction.get", [txid, False]) | ||
if verbose: | ||
return self.sock.call("blockchain.transaction.get", [txid, True]) | ||
else: | ||
return self.sock.call("blockchain.transaction.get", [txid, False]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be simplified a lot. If you're unsure how to do that, please ask chatGPT to do it.
What do you mean by "recognise"? It would be cool to have a test here as well. Especially because you seem to do some kind of test and then claim that your test failed ("recognise it"). For some stuff we could do integration-tests. E.g. this one is imho a great candidate.
It might be that this only works locally and not in the CI but i think it's still valuable to do that. |
I would say that the ability of downloading the whitepaper when it comes to code in this repo might be the best acceptance criteria for this PR to merge. So is it possible? |
Fixes #32.