Check content before zip/unzip the txhashset (#1174)

* Check txhashset content before zip/unzip
* Add header in txhashset verification
* Add copy function and test
* Add file util
* Now check and remove unexpected files instead of just crashing
This commit is contained in:
Quentin Le Sceller
2018-08-02 22:16:16 -04:00
committed by Ignotus Peverell
parent 3ee01055ed
commit 3df050cc93
11 changed files with 297 additions and 24 deletions
+1 -1
View File
@@ -285,7 +285,7 @@ where
Ok(elmt_pos)
}
/// Saves a snaphost of the MMR tagged with the block hash.
/// Saves a snapshot of the MMR tagged with the block hash.
/// Specifically - snapshots the utxo file as we need this rewound before
/// sending the txhashset zip file to another node for fast-sync.
pub fn snapshot(&mut self, header: &BlockHeader) -> Result<(), String> {