Closed yoss22 closed 5 years ago
Let me know if you think this is a good change or not. This is my first experience with rust, so please say if it can be improved.
Thanks, we're not actually using extra_data in grin anywhere, but there's no harm including this anyhow (we're branching shortly for permanent testnet)
Currently if extra_data is empty we pass an empty vec with length 0 to secp256k1. This causes an additional unnecessary sha256 call in both the prover and the verifier. This commit changes the calls to pass a null pointer to secp256k1 which avoids this extra hashing.
NOTE: This is consensus breaking.