diff --git a/state/factory/statedb.go b/state/factory/statedb.go index fd29649954..fc8fc16ba4 100644 --- a/state/factory/statedb.go +++ b/state/factory/statedb.go @@ -190,7 +190,15 @@ func (sdb *stateDB) Height() (uint64, error) { } func (sdb *stateDB) newReadOnlyWorkingSet(ctx context.Context, height uint64) (*workingSet, error) { - return sdb.newWorkingSetWithKVStore(ctx, height, &readOnlyKV{sdb.dao.atHeight(height)}) + store, err := sdb.createWorkingSetStore(ctx, height, &readOnlyKV{sdb.dao.atHeight(height)}) + if err != nil { + return nil, err + } + if err := store.Start(ctx); err != nil { + return nil, err + } + + return newWorkingSet(height, sdb.protocolViews, store, sdb), nil } func (sdb *stateDB) newWorkingSet(ctx context.Context, height uint64) (*workingSet, error) {