To test:
-> getblock(getbestblockhash(), 1)[tx][22222222222222222222222222222]
Before:
<- 868693731dea69a197c13c2cfaa41c9f78fcdeb8ab8e9f8cdf2c9025147ee7d1
(hash of the coinbase tx)
After:
<- Error: Invalid result query
To test:
-> getblock(getbestblockhash(), 1)[tx][22222222222222222222222222222]
Before:
<- 868693731dea69a197c13c2cfaa41c9f78fcdeb8ab8e9f8cdf2c9025147ee7d1
(hash of the coinbase tx)
After:
<- Error: Invalid result query
ACK faa5e171e6bdb8f3b4027a3f06497f0de5abf766
tested and code review ack. This is a nice catch!
on master:
0<- getblock(getbestblockhash(), 1)[tx][22222222222222222222222222222]
1-> e3038545d5b68dc61a282f15eb8e3ffbfb50c3f9955380a1fde3c1c858414d38
on PR branch:
0<- getblock(getbestblockhash(), 1)[tx][22222222222222222222222222222]
1-> Error: Invalid result query
ACK faa5e17 Tested on Ubuntu 20.04
This PR allows displaying runtime error for inputs greater than the limit of size_t type.
This is done by using the ToIntegral<size_t> function, which will check the size of the input argument. Earlier, the logic was to check if each character of the input argument is a digit or not without considering the overall length of the input argument.
This is undoubtedly an improvement over the current Master, and I agree with this PR. I am adding the screenshot of input and outputs that I used to test this PR on the GUI console. The test was done on the Signet network.
Screenshots:
Master (outputs null, without errors) | PR (output error) |
---|---|
Labels
Bug