In rest_getutxos
truncated txids such as aa
or ff
are accepted. This is brittle at best.
Fix it by rejecting any truncated (or overlarge) input.
Review note: This also starts a major refactor to rework hex parsing in Bitcoin Core, meaning that a few refactor commits are included as well. They are explained individually in the commit message and the work will be continued in the future.