|
@@ -66,11 +66,13 @@ contract CheckpointsHistoryTest is Test {
|
|
|
// Can't push any key in the past
|
|
|
if (keys.length > 0) {
|
|
|
uint32 lastKey = keys[keys.length - 1];
|
|
|
- pastKey = _boundUint32(pastKey, 0, lastKey - 1);
|
|
|
+ if (lastKey > 0) {
|
|
|
+ pastKey = _boundUint32(pastKey, 0, lastKey - 1);
|
|
|
|
|
|
- vm.roll(pastKey);
|
|
|
- vm.expectRevert();
|
|
|
- this.push(values[keys.length % values.length]);
|
|
|
+ vm.roll(pastKey);
|
|
|
+ vm.expectRevert();
|
|
|
+ this.push(values[keys.length % values.length]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -185,10 +187,12 @@ contract CheckpointsTrace224Test is Test {
|
|
|
|
|
|
if (keys.length > 0) {
|
|
|
uint32 lastKey = keys[keys.length - 1];
|
|
|
- pastKey = _boundUint32(pastKey, 0, lastKey - 1);
|
|
|
+ if (lastKey > 0) {
|
|
|
+ pastKey = _boundUint32(pastKey, 0, lastKey - 1);
|
|
|
|
|
|
- vm.expectRevert();
|
|
|
- this.push(pastKey, values[keys.length % values.length]);
|
|
|
+ vm.expectRevert();
|
|
|
+ this.push(pastKey, values[keys.length % values.length]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -291,10 +295,12 @@ contract CheckpointsTrace160Test is Test {
|
|
|
|
|
|
if (keys.length > 0) {
|
|
|
uint96 lastKey = keys[keys.length - 1];
|
|
|
- pastKey = _boundUint96(pastKey, 0, lastKey - 1);
|
|
|
+ if (lastKey > 0) {
|
|
|
+ pastKey = _boundUint96(pastKey, 0, lastKey - 1);
|
|
|
|
|
|
- vm.expectRevert();
|
|
|
- this.push(pastKey, values[keys.length % values.length]);
|
|
|
+ vm.expectRevert();
|
|
|
+ this.push(pastKey, values[keys.length % values.length]);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|