add test to demonstrate pair of "half" kernels sharing same public excess (#3314)
* cleanup how we handle key splitting for transaction offset add test to demonstrate a pair of transaction halves sharing same kernel excess * cleanup * cleanup
This commit is contained in:
+7
-1
@@ -29,6 +29,7 @@ use grin_util as util;
|
||||
use std::cmp::Reverse;
|
||||
use std::collections::{HashMap, HashSet};
|
||||
use std::sync::Arc;
|
||||
use util::static_secp_instance;
|
||||
|
||||
pub struct Pool<B, V>
|
||||
where
|
||||
@@ -272,7 +273,12 @@ where
|
||||
header: &BlockHeader,
|
||||
) -> Result<BlockSums, PoolError> {
|
||||
let overage = tx.overage();
|
||||
let offset = (header.total_kernel_offset() + tx.offset.clone())?;
|
||||
|
||||
let offset = {
|
||||
let secp = static_secp_instance();
|
||||
let secp = secp.lock();
|
||||
header.total_kernel_offset().add(&tx.offset, &secp)
|
||||
}?;
|
||||
|
||||
let block_sums = self.blockchain.get_block_sums(&header.hash())?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user