Feature/slate serialization (#2534)
* - Add backwards compatability - Add hex serialization * rustfmt * rustfmt * Windows Compatibility Fixes #1 (#2535) * initial changes for windows build and unit/integration tests * rustfmt * wallet+store tests * rustfmt * fix linux daemonize * better encapsulate file rename * rustfmt * remove daemonize commands * rustfmt * remove server start/stop commands * add ability to drop pmmr backend files explicitly for txhashset unzip * rustfmt * fix pmmr tests * rustfmt * Windows TUI Fix (#2555) * switch pancurses backend to win32 * revert changes to restore test * compatibility fix + debug messages * rustfmt * Add content disposition for OK responses (#2545) * Testing http send and fixing accordingly * add repost method into wallet owner api (#2553) * add repost method into wallet owner api * rustfmt * Add ability to compare selection strategies (#2516) Before tx creation user can estimate fee and locked amount with different selection strategies by providing `-e` flag for `wallet send` command.
This commit is contained in:
committed by
Yeastplume
parent
0d36acf01b
commit
ee4eed71ea
@@ -857,6 +857,14 @@ impl Chain {
|
||||
}
|
||||
|
||||
let header = self.get_block_header(&h)?;
|
||||
|
||||
{
|
||||
let mut txhashset_ref = self.txhashset.write();
|
||||
// Drop file handles in underlying txhashset
|
||||
txhashset_ref.release_backend_files();
|
||||
}
|
||||
|
||||
// Rewrite hashset
|
||||
txhashset::zip_write(self.db_root.clone(), txhashset_data, &header)?;
|
||||
|
||||
let mut txhashset =
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
use crate::core::core::committed::Committed;
|
||||
use crate::core::core::hash::{Hash, Hashed};
|
||||
use crate::core::core::merkle_proof::MerkleProof;
|
||||
use crate::core::core::pmmr::{self, ReadonlyPMMR, RewindablePMMR, PMMR};
|
||||
use crate::core::core::pmmr::{self, Backend, ReadonlyPMMR, RewindablePMMR, PMMR};
|
||||
use crate::core::core::{
|
||||
Block, BlockHeader, Input, Output, OutputIdentifier, TxKernel, TxKernelEntry,
|
||||
};
|
||||
@@ -153,6 +153,15 @@ impl TxHashSet {
|
||||
})
|
||||
}
|
||||
|
||||
/// Close all backend file handles
|
||||
pub fn release_backend_files(&mut self) {
|
||||
self.header_pmmr_h.backend.release_files();
|
||||
self.sync_pmmr_h.backend.release_files();
|
||||
self.output_pmmr_h.backend.release_files();
|
||||
self.rproof_pmmr_h.backend.release_files();
|
||||
self.kernel_pmmr_h.backend.release_files();
|
||||
}
|
||||
|
||||
/// Check if an output is unspent.
|
||||
/// We look in the index to find the output MMR pos.
|
||||
/// Then we check the entry in the output MMR and confirm the hash matches.
|
||||
|
||||
Reference in New Issue
Block a user