Added blockhash argument to getrawtransaction api#39
Added blockhash argument to getrawtransaction api#39PaarthAgarwal wants to merge 2 commits intocryptoadvance:masterfrom
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.
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.