lightwalletd icon indicating copy to clipboard operation
lightwalletd copied to clipboard

Size assumptions in parsing code don't hold for regtest blocks

Open str4d opened this issue 5 years ago • 3 comments

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

str4d avatar Jan 28 '19 21:01 str4d