mirror of
https://github.com/tendermint/tendermint.git
synced 2026-01-09 14:43:19 +00:00
@@ -37,12 +37,12 @@ func calcABCIResponsesKey(height int64) []byte {
|
||||
return []byte(fmt.Sprintf("abciResponsesKey:%v", height))
|
||||
}
|
||||
|
||||
func calcLastABCIResponsesKey(height int64) []byte {
|
||||
return []byte(fmt.Sprintf("lastABCIResponsesKey:%v", height))
|
||||
}
|
||||
|
||||
//----------------------
|
||||
|
||||
var (
|
||||
lastABCIResponseKey = []byte("lastABCIResponseKey")
|
||||
)
|
||||
|
||||
//go:generate ../scripts/mockery_generate.sh Store
|
||||
|
||||
// Store defines the state store interface
|
||||
@@ -410,7 +410,7 @@ func (store dbStore) LoadABCIResponses(height int64) (*tmstate.ABCIResponses, er
|
||||
// This method is used for recovering in the case that we called the Commit ABCI
|
||||
// method on the application but crashed before persisting the results.
|
||||
func (store dbStore) LoadLastABCIResponse(height int64) (*tmstate.ABCIResponses, error) {
|
||||
bz, err := store.db.Get(calcLastABCIResponsesKey(height))
|
||||
bz, err := store.db.Get(lastABCIResponseKey)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -473,7 +473,7 @@ func (store dbStore) SaveABCIResponses(height int64, abciResponses *tmstate.ABCI
|
||||
return err
|
||||
}
|
||||
|
||||
return store.db.SetSync(calcLastABCIResponsesKey(height), bz)
|
||||
return store.db.SetSync(lastABCIResponseKey, bz)
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user