* added debug logging to see what we're doing in save_pos_index * add counts to logging * make sure inputs/outputs in tx are sorted tweak debug logging * DRY up sorting of inputs/outputs/kernels via a simple sort() in ser/deser * add explicit validation fo sort order during tx and block validation * sort order consensus rule for inputs/outputs/kernels in blocks * we want a max of 10*num_peers blocks during sync... not min * fix test imports
This commit is contained in:
@@ -323,12 +323,28 @@ impl<'a> Extension<'a> {
|
||||
}
|
||||
|
||||
fn save_pos_index(&self) -> Result<(), Error> {
|
||||
debug!(
|
||||
LOGGER,
|
||||
"sumtree: save_pos_index: outputs: {}, {:?}",
|
||||
self.new_output_commits.len(),
|
||||
self.new_output_commits.values().collect::<Vec<_>>(),
|
||||
);
|
||||
|
||||
for (commit, pos) in &self.new_output_commits {
|
||||
self.commit_index.save_output_pos(commit, *pos)?;
|
||||
}
|
||||
|
||||
debug!(
|
||||
LOGGER,
|
||||
"sumtree: save_pos_index: kernels: {}, {:?}",
|
||||
self.new_kernel_excesses.len(),
|
||||
self.new_kernel_excesses.values().collect::<Vec<_>>(),
|
||||
);
|
||||
|
||||
for (excess, pos) in &self.new_kernel_excesses {
|
||||
self.commit_index.save_kernel_pos(excess, *pos)?;
|
||||
}
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user