[testnet2] Store output sum (#1043)
* block sums and reworked block validation read and write block_sums refactor validate on both block and txhashset write block_sum on fast sync we store the kernel_sum (need to account for the offset) * block_sums * rustfmt * cleanup
This commit is contained in:
@@ -32,3 +32,11 @@ pub fn static_secp_instance() -> Arc<Mutex<secp::Secp256k1>> {
|
||||
secp_inst.randomize(&mut thread_rng());
|
||||
SECP256K1.clone()
|
||||
}
|
||||
|
||||
// TODO - Can we generate this once and memoize it for subsequent use?
|
||||
// Even if we clone it each time it will likely be faster than this.
|
||||
pub fn commit_to_zero_value() -> secp::pedersen::Commitment {
|
||||
let secp = static_secp_instance();
|
||||
let secp = secp.lock().unwrap();
|
||||
secp.commit_value(0).unwrap()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user