MakePartSet takes partSize from config. fix replay test

This commit is contained in:
Jae Kwon
2016-09-16 09:20:07 -07:00
committed by Ethan Buchman
parent 95c8bb4252
commit d83fc02597
16 changed files with 102 additions and 67 deletions

View File

@ -21,9 +21,9 @@ var baseStepChanges = []int{3, 6, 8}
// test recovery from each line in each testCase
var testCases = []*testCase{
newTestCase("empty_block", baseStepChanges), // empty block (has 1 block part)
newTestCase("small_block1", baseStepChanges), // small block with txs in 1 block part
newTestCase("small_block2", []int{3, 8, 10}), // small block with txs across 3 smaller block parts
newTestCase("empty_block", baseStepChanges), // empty block (has 1 block part)
newTestCase("small_block1", baseStepChanges), // small block with txs in 1 block part
newTestCase("small_block2", []int{3, 10, 12}), // small block with txs across 5 smaller block parts
}
type testCase struct {
@ -133,7 +133,7 @@ func setupReplayTest(thisCase *testCase, nLines int, crashAfter bool) (*Consensu
// set the last step according to when we crashed vs the wal
toPV(cs.privValidator).LastHeight = 1 // first block
toPV(cs.privValidator).LastStep = mapPrivValStep[lineStep]
toPV(cs.privValidator).LastStep = thisCase.stepMap[lineStep]
log.Warn("setupReplayTest", "LastStep", toPV(cs.privValidator).LastStep)