fresh state and mock store
( config *cfg.Config, pubKey crypto.PubKey, appVersion uint64, )
| 1159 | |
| 1160 | // fresh state and mock store |
| 1161 | func stateAndStore( |
| 1162 | config *cfg.Config, |
| 1163 | pubKey crypto.PubKey, |
| 1164 | appVersion uint64, |
| 1165 | ) (dbm.DB, sm.State, *mockBlockStore) { |
| 1166 | stateDB := dbm.NewMemDB() |
| 1167 | stateStore := sm.NewStore(stateDB, sm.StoreOptions{ |
| 1168 | DiscardABCIResponses: false, |
| 1169 | }) |
| 1170 | state, _ := sm.MakeGenesisStateFromFile(config.GenesisFile()) |
| 1171 | state.Version.Consensus.App = appVersion |
| 1172 | store := newMockBlockStore(config, state.ConsensusParams) |
| 1173 | if err := stateStore.Save(state); err != nil { |
| 1174 | panic(err) |
| 1175 | } |
| 1176 | return stateDB, state, store |
| 1177 | } |
| 1178 | |
| 1179 | //---------------------------------- |
| 1180 | // mock block store |
no test coverage detected