File tree Expand file tree Collapse file tree 1 file changed +13
-14
lines changed
Expand file tree Collapse file tree 1 file changed +13
-14
lines changed Original file line number Diff line number Diff line change 44 "context"
55 "github.com/PlatONnetwork/PlatON-Go/consensus"
66 ctypes "github.com/PlatONnetwork/PlatON-Go/consensus/cbft/types"
7- "github.com/PlatONnetwork/PlatON-Go/core/state"
87 "github.com/PlatONnetwork/PlatON-Go/p2p/enode"
98 "sync/atomic"
109 "time"
@@ -75,12 +74,12 @@ func (ctx *BlockTimeContext) Deadline() time.Time {
7574}
7675
7776type Context struct {
78- ctx context.Context
79- backend sdk.Backend
80- cbft CbftEngine
81- blockIndex uint32
82- header * types.Header
83- statedb atomic.Value
77+ ctx context.Context
78+ backend sdk.Backend
79+ cbft CbftEngine
80+ blockIndex uint32
81+ header * types.Header
82+ // statedb atomic.Value
8483 parentStateDB atomic.Value
8584}
8685
@@ -129,14 +128,14 @@ func (ctx *Context) Header() *types.Header {
129128}
130129
131130func (ctx * Context ) StateDB () sdk.StateDBReader {
132- if ctx .cbft == nil {
133- return nil
134- }
135- if s := ctx .statedb .Load (); s != nil {
136- return s .(sdk.StateDBReader ).(* state.StateDB ).NewStateDB ()
137- }
131+ // if ctx.cbft == nil {
132+ // return nil
133+ // }
134+ // if s := ctx.statedb.Load(); s != nil {
135+ // return s.(sdk.StateDBReader).(*state.StateDB).NewStateDB()
136+ // }
138137 state , _ := ctx .cbft .GetState (ctx .Header ())
139- ctx .statedb .Store (state )
138+ // ctx.statedb.Store(state)
140139 return state
141140}
142141
You can’t perform that action at this time.
0 commit comments