Merge PR #4791: resume simulations at a given height
This commit is contained in:
committed by
Alexander Bezobchuk
parent
861e4798ad
commit
c4e3578087
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user