Integrate sum trees with the rest of the system (#116)
* Integrate PMMR and its persistent backend with the Chain * Chain can set tree roots; PMMR backend discard * Check spent and prune for each input in new block * Handling of forks by rewinding the state * More PMMR tests and fixes, mostly around rewind * Rewrite get_unspent to use the sumtrees, fix remaining compilation issues
This commit is contained in:
+3
-1
@@ -25,6 +25,7 @@ use rand;
|
||||
use std::fmt;
|
||||
|
||||
use core::core;
|
||||
use core::core::hash::Hashed;
|
||||
|
||||
/// An entry in the transaction pool.
|
||||
/// These are the vertices of both of the graph structures
|
||||
@@ -214,7 +215,8 @@ impl DirectedGraph {
|
||||
/// proofs and any extra data the kernel may cover, but it is used initially
|
||||
/// for testing purposes.
|
||||
pub fn transaction_identifier(tx: &core::transaction::Transaction) -> core::hash::Hash {
|
||||
core::transaction::merkle_inputs_outputs(&tx.inputs, &tx.outputs)
|
||||
// core::transaction::merkle_inputs_outputs(&tx.inputs, &tx.outputs)
|
||||
tx.hash()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user