mirror of
https://github.com/mimblewimble/grin.git
synced 2025-02-01 17:01:09 +03:00
minor test fix (#669)
This commit is contained in:
parent
5fd47fb875
commit
f288a18b0c
1 changed files with 6 additions and 1 deletions
|
@ -224,7 +224,12 @@ pub fn difficulty_data_to_vector<T>(cursor: T) -> Vec<Result<(u64, Difficulty),
|
||||||
.map(|b| (b.clone().unwrap().0, b.clone().unwrap().1))
|
.map(|b| (b.clone().unwrap().0, b.clone().unwrap().1))
|
||||||
.collect();
|
.collect();
|
||||||
for i in (1..live_intervals.len()).rev() {
|
for i in (1..live_intervals.len()).rev() {
|
||||||
live_intervals[i].0=live_intervals[i].0-live_intervals[i-1].0;
|
// prevents issues with very fast automated test chains
|
||||||
|
if live_intervals[i-1].0 > live_intervals[i].0 {
|
||||||
|
live_intervals[i].0 = 0;
|
||||||
|
} else {
|
||||||
|
live_intervals[i].0=live_intervals[i].0-live_intervals[i-1].0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
// Remove genesis "interval"
|
// Remove genesis "interval"
|
||||||
|
|
Loading…
Reference in a new issue