We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e993b85 commit 41ab1cdCopy full SHA for 41ab1cd
consensus/cbft/context/context.go
@@ -4,6 +4,7 @@ import (
4
"context"
5
"github.com/PlatONnetwork/PlatON-Go/consensus"
6
ctypes "github.com/PlatONnetwork/PlatON-Go/consensus/cbft/types"
7
+ "github.com/PlatONnetwork/PlatON-Go/core/state"
8
"github.com/PlatONnetwork/PlatON-Go/p2p/enode"
9
"sync/atomic"
10
"time"
@@ -132,7 +133,7 @@ func (ctx *Context) StateDB() sdk.StateDBReader {
132
133
return nil
134
}
135
if s := ctx.statedb.Load(); s != nil {
- return s.(types.StateDBReader)
136
+ return s.(sdk.StateDBReader).(*state.StateDB).NewStateDB()
137
138
state, _ := ctx.cbft.GetState(ctx.Header())
139
ctx.statedb.Store(state)
0 commit comments