rocket_satoshiMember
Posts: 2 · Reputation: 52
#1Oct 25, 2018, 03:26 AM
I've been trying to figure out how the hashing works for the RPC command dumptxoutset in the latest version 28.0.
Maybe someone here can point me in the right direction.
I think it’s using the HASH_SERIALIZED type instead of that MUHASH thing. So, I figured it's just a straightforward SHA256 of all the "Coin" entries, laid out like in the file created by dumptxoutset.
From the source code, it seems like each entry is fed into the hasher one after the other. After that, I do another SHA256 on the whole output.
But it’s not working for me, since I’m not getting the same value as the "txoutset_hash" returned by dumptxoutset.
Is there possibly a script_length field lurking between the Amount and the script itself?