lightwalletd
lightwalletd copied to clipboard
Size assumptions in parsing code don't hold for regtest blocks
The code below will write an incorrect block if the Equihash parameters are different from mainnet (e.g. for regtest blocks):
https://github.com/zcash-hackworks/lightwalletd/blob/3071b5759ae5b7651d5d13c664e5eb2f5bf503f3/parser/block_header.go#L75-L77
The read side does correctly handle the length:
https://github.com/zcash-hackworks/lightwalletd/blob/3071b5759ae5b7651d5d13c664e5eb2f5bf503f3/parser/block_header.go#L124-L126