decouple kernels from the kernel MMR (#2043)

This commit is contained in:
Antioch Peverell
2018-11-29 10:01:59 +00:00
committed by GitHub
parent 8e3a3e1a40
commit 8e62130a7a
3 changed files with 17 additions and 16 deletions
+9 -8
View File
@@ -188,6 +188,15 @@ impl Readable for TxKernel {
}
}
/// We store TxKernelEntry in the kernel MMR.
impl PMMRable for TxKernel {
type E = TxKernelEntry;
fn as_elmt(self) -> Self::E {
self.into()
}
}
impl TxKernel {
/// Return the excess commitment for this tx_kernel.
pub fn excess(&self) -> Commitment {
@@ -310,14 +319,6 @@ impl FixedLength for TxKernelEntry {
+ secp::constants::AGG_SIGNATURE_SIZE;
}
impl PMMRable for TxKernelEntry {
type E = Self;
fn as_elmt(self) -> Self::E {
self
}
}
/// TransactionBody is a common abstraction for transaction and block
#[derive(Serialize, Deserialize, Debug, Clone)]
pub struct TransactionBody {