Merge PR #4791: resume simulations at a given height

This commit is contained in:
Federico Kunze
2019-08-02 11:28:50 -04:00
committed by Alexander Bezobchuk
parent 861e4798ad
commit c4e3578087
4 changed files with 15 additions and 8 deletions
+5 -3
View File
@@ -47,7 +47,7 @@ func SimulateFromSeed(
tb testing.TB, w io.Writer, app *baseapp.BaseApp,
appStateFn AppStateFn, seed int64,
ops WeightedOperations, invariants sdk.Invariants,
numBlocks, exportParamsHeight, blockSize int,
initialHeight, numBlocks, exportParamsHeight, blockSize int,
exportStatsPath string,
exportParams, commit, lean, onOperation, allInvariants bool,
blackListedAccs map[string]bool,
@@ -139,10 +139,12 @@ func SimulateFromSeed(
}
// set exported params to the initial state
exportedParams = params
if exportParams && exportParamsHeight == 0 {
exportedParams = params
}
// TODO: split up the contents of this for loop into new functions
for height := 1; height <= numBlocks && !stopEarly; height++ {
for height := initialHeight; height < numBlocks+initialHeight && !stopEarly; height++ {
// Log the header time for future lookup
pastTimes = append(pastTimes, header.Time)