Skip to content

Commit

Permalink
fix a few typos (#5402)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuantumExplorer authored and erikgrinaker committed Oct 22, 2020
1 parent 41ab199 commit 1b733ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion abci/example/kvstore/kvstore_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func TestValUpdates(t *testing.T) {
total := 10
nInit := 5
vals := RandVals(total)
// iniitalize with the first nInit
// initialize with the first nInit
kvstore.InitChain(types.RequestInitChain{
Validators: vals[:nInit],
})
Expand Down
14 changes: 7 additions & 7 deletions consensus/replay_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -665,17 +665,17 @@ func testHandshakeReplay(t *testing.T, config *cfg.Config, nBlocks int, mode uin
var commits []*types.Commit
var store *mockBlockStore
var stateDB dbm.DB
var genisisState sm.State
var genesisState sm.State
if testValidatorsChange {
testConfig := ResetConfig(fmt.Sprintf("%s_%v_m", t.Name(), mode))
defer os.RemoveAll(testConfig.RootDir)
stateDB = dbm.NewMemDB()

genisisState = sim.GenesisState
genesisState = sim.GenesisState
config = sim.Config
chain = append([]*types.Block{}, sim.Chain...) // copy chain
commits = sim.Commits
store = newMockBlockStore(config, genisisState.ConsensusParams)
store = newMockBlockStore(config, genesisState.ConsensusParams)
} else { //test single node
testConfig := ResetConfig(fmt.Sprintf("%s_%v_s", t.Name(), mode))
defer os.RemoveAll(testConfig.RootDir)
Expand All @@ -700,14 +700,14 @@ func testHandshakeReplay(t *testing.T, config *cfg.Config, nBlocks int, mode uin
require.NoError(t, err)
pubKey, err := privVal.GetPubKey()
require.NoError(t, err)
stateDB, genisisState, store = stateAndStore(config, pubKey, kvstore.ProtocolVersion)
stateDB, genesisState, store = stateAndStore(config, pubKey, kvstore.ProtocolVersion)

}
stateStore := sm.NewStore(stateDB)
store.chain = chain
store.commits = commits

state := genisisState.Copy()
state := genesisState.Copy()
// run the chain through state.ApplyBlock to build up the tendermint state
state = buildTMStateFromChain(config, stateStore, state, chain, nBlocks, mode)
latestAppHash := state.AppHash
Expand All @@ -723,9 +723,9 @@ func testHandshakeReplay(t *testing.T, config *cfg.Config, nBlocks int, mode uin
proxyApp := proxy.NewAppConns(clientCreator2)
stateDB1 := dbm.NewMemDB()
stateStore := sm.NewStore(stateDB1)
err := stateStore.Save(genisisState)
err := stateStore.Save(genesisState)
require.NoError(t, err)
buildAppStateFromChain(proxyApp, stateStore, genisisState, chain, nBlocks, mode)
buildAppStateFromChain(proxyApp, stateStore, genesisState, chain, nBlocks, mode)
}

// Prune block store if requested
Expand Down

0 comments on commit 1b733ea

Please sign in to comment.