Author

Topic: what is the struct of value in the leveldb when use 'b' + block hash as a key (Read 147 times)

newbie
Activity: 8
Merit: 3
There is no struct; it is a class that has a specific serialization. The implementation details can be found here: https://github.com/bitcoin/bitcoin/blob/master/src/chain.h#L370. The other stuff there (which can vary for each block), include the block's position on disk, its height, and the number of transactions.

Thanks!
staff
Activity: 3458
Merit: 6793
Just writing some code
There is no struct; it is a class that has a specific serialization. The implementation details can be found here: https://github.com/bitcoin/bitcoin/blob/master/src/chain.h#L370. The other stuff there (which can vary for each block), include the block's position on disk, its height, and the number of transactions.
newbie
Activity: 8
Merit: 3
when i use 'b' + block hash as a key search the leveldb,  i can not figure out the struct of values.

for exmaple:
search 'b' + "000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f"       //  Block #0

value 88bytes:
889271000b010008010000000000000000000000000000000000000000000000000000000000000 0000000003ba3edfd7a7b12b27ac72c3e67768f617fc81bc3888a51323a9fb8aa4b1e5e4a29ab5f 49ffff001d1dac2b7c

i know the last 80bytes is the block header,  but the first 8bytes , i do not known what it is?
"889271000b010008" HuhHuh

plz tell me the struct or tell me which .cpp contain the struct, thanks a lot!
Jump to: