Storage stage updates

* Remove logging init from storage program: saw a crash in a test
  indicating the logger being init'ed twice.
* Add entry_height mining proof to indicate which segment the result is
  for
* Add an interface to get storage miner pubkeys for a given entry_height
* Add an interface to get the current storage mining entry_height
* Set the tvu socket to 0.0.0.0:0 in replicator to stop getting entries
  after the desired ledger segment is downloaded.
* Use signature of PoH height to determine which block to download for
  replicator.
This commit is contained in:
Stephen Akridge
2018-12-10 11:38:29 -08:00
committed by sakridge
parent 3ce3f1adc1
commit 7cdbbfa88e
12 changed files with 287 additions and 86 deletions

View File

@@ -350,9 +350,10 @@ pub fn process_blob(
// Check if we ran over the last wanted entry
if consumed > max_ix {
let extra_unwanted_entries_len = consumed - (max_ix + 1);
let consumed_entries_len = consumed_entries.len();
consumed_entries.truncate(consumed_entries_len - extra_unwanted_entries_len as usize);
let extra_unwanted_entries_len =
cmp::min(consumed_entries_len, (consumed - (max_ix + 1)) as usize);
consumed_entries.truncate(consumed_entries_len - extra_unwanted_entries_len);
done.store(true, Ordering::Relaxed);
}
}