I am facing a stupid problem. I am trying to read bitcoin/blocks/index leveldb using plyvel. I've set up a regtest and i know there is a block with the hash :
I am trying to query it using plyvel.
Note that I already read the topics :
Then, I know I have to swap the endianness so it becomes :
MYVAR = "4b67af01baa540cb587d3be4c9a3d8fc07f29ec2de92f3e4962fe2de9981ce27"
Thus, I should query something like :
b + (byte) MYVAR
However I do not get how. I guess I missunderstand something in encoding. I tried :
Then, I opened the bitcoin/blocks/index leveldb using a gui explorer and I noticed the key for this block is :
which is \x62 corresponding to the "b" + the hash with \x (escaping caracter ? I know here is my misunderstanding on hex encoding)
I also tried these methods :
No one of them works and I really don't get why :
Thank you in advance