Hello, this PR adds a feature to getblock
which allows to get the blockdata directly without the need for using getblockhash
first.
First it checks if you have provided an input smaller than 64 characters. After that it checks if the input is a valid number or if it contains letters. If it is a valid number it will request the blockhash for this index.
The feature to use the hash directly works of course as well.
If the user provides an input which is smaller than 64 characters and is not a valid number it will return an error.
The changes were tested by myself and they work.
The reason for this improvement is that it is too exaggerated for me to first get the hash of an index and then get the block data with two separate commands.