Merge branch 'cal/vote-extensions-1' into cal/vote-extensions-2

This commit is contained in:
Callum Waters
2022-11-28 18:07:03 +01:00
55 changed files with 896 additions and 403 deletions

View File

@@ -152,7 +152,7 @@ func NewNode(config *cfg.Config,
}
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
DiscardFinalizeBlockResponses: config.Storage.DiscardFinalizeBlockResponses,
DiscardABCIResponses: config.Storage.DiscardABCIResponses,
})
state, genDoc, err := LoadStateFromDBOrGenesisDocProvider(stateDB, genesisDocProvider)
@@ -171,7 +171,7 @@ func NewNode(config *cfg.Config,
// EventBus and IndexerService must be started before the handshake because
// we might need to index the txs of the replayed block as this might not have happened
// when the node stopped last time (i.e. the node stopped after it saved the block
// but before it indexed the txs, or, endblocker panicked)
// but before it indexed the txs)
eventBus, err := createAndStartEventBus(logger)
if err != nil {
return nil, err

View File

@@ -261,7 +261,7 @@ func TestCreateProposalBlock(t *testing.T) {
var height int64 = 1
state, stateDB, privVals := state(1, height)
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
DiscardFinalizeBlockResponses: false,
DiscardABCIResponses: false,
})
maxBytes := 16384
var partSize uint32 = 256
@@ -374,7 +374,7 @@ func TestMaxProposalBlockSize(t *testing.T) {
var height int64 = 1
state, stateDB, _ := state(1, height)
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
DiscardFinalizeBlockResponses: false,
DiscardABCIResponses: false,
})
var maxBytes int64 = 16384
var partSize uint32 = 256
@@ -507,7 +507,7 @@ func state(nVals int, height int64) (sm.State, dbm.DB, []types.PrivValidator) {
// save validators to db for 2 heights
stateDB := dbm.NewMemDB()
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
DiscardFinalizeBlockResponses: false,
DiscardABCIResponses: false,
})
if err := stateStore.Save(s); err != nil {
panic(err)

View File

@@ -620,7 +620,7 @@ func LoadStateFromDBOrGenesisDocProvider(
}
}
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
DiscardFinalizeBlockResponses: false,
DiscardABCIResponses: false,
})
state, err := stateStore.LoadFromDBOrGenesisDoc(genDoc)
if err != nil {