Report number of entries and last_id on successful verification
This commit is contained in:
parent
443d8ce7c4
commit
818afc68c1
@ -124,7 +124,7 @@ fn main() {
|
|||||||
let head = head - NUM_GENESIS_ENTRIES;
|
let head = head - NUM_GENESIS_ENTRIES;
|
||||||
|
|
||||||
let mut last_id = bank.last_id();
|
let mut last_id = bank.last_id();
|
||||||
|
let mut num_entries = 0;
|
||||||
for (i, entry) in entries.enumerate() {
|
for (i, entry) in entries.enumerate() {
|
||||||
if i >= head {
|
if i >= head {
|
||||||
break;
|
break;
|
||||||
@ -137,6 +137,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
last_id = entry.id;
|
last_id = entry.id;
|
||||||
|
num_entries += 1;
|
||||||
|
|
||||||
if let Err(e) = bank.process_entry(&entry) {
|
if let Err(e) = bank.process_entry(&entry) {
|
||||||
eprintln!("verify failed at entry[{}], err: {:?}", i + 2, e);
|
eprintln!("verify failed at entry[{}], err: {:?}", i + 2, e);
|
||||||
@ -145,6 +146,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
println!("{} entries. last_id={:?}", num_entries, last_id);
|
||||||
}
|
}
|
||||||
("", _) => {
|
("", _) => {
|
||||||
eprintln!("{}", matches.usage());
|
eprintln!("{}", matches.usage());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user