Skip to content

Commit

Permalink
Merge branch 'master' into protect
Browse files Browse the repository at this point in the history
  • Loading branch information
envestcc authored Dec 3, 2024
2 parents be137d2 + 1baff04 commit cbe1179
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions blockchain/integrity/integrity_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2356,7 +2356,7 @@ func testHistoryForAccount(t *testing.T, statetx bool) {
// check history account's balance
if statetx {
_, err = sf.WorkingSetAtHeight(ctx, 0)
require.Equal(factory.ErrNotSupported, errors.Cause(err))
require.NoError(err)
} else {
sr, err := sf.WorkingSetAtHeight(ctx, bc.TipHeight()-1)
require.NoError(err)
Expand Down Expand Up @@ -2404,7 +2404,7 @@ func testHistoryForContract(t *testing.T, statetx bool) {
// check the the original balance again
if statetx {
_, err = sf.WorkingSetAtHeight(ctx, bc.TipHeight()-1)
require.Equal(factory.ErrNotSupported, errors.Cause(err))
require.NoError(err)
} else {
sr, err := sf.WorkingSetAtHeight(ctx, bc.TipHeight()-1)
require.NoError(err)
Expand Down
2 changes: 1 addition & 1 deletion state/factory/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ func testHistoryState(sf Factory, t *testing.T, statetx, archive bool) {
if statetx {
// statetx not support archive mode yet
_, err = sf.WorkingSetAtHeight(ctx, 0)
require.Equal(t, ErrNotSupported, errors.Cause(err))
require.NoError(t, err)
} else {
_, err = sf.WorkingSetAtHeight(ctx, 10)
if !archive {
Expand Down
2 changes: 1 addition & 1 deletion state/factory/statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ func (sdb *stateDB) WorkingSet(ctx context.Context) (protocol.StateManager, erro

func (sdb *stateDB) WorkingSetAtHeight(ctx context.Context, height uint64) (protocol.StateManager, error) {
// TODO: implement archive mode
return nil, ErrNotSupported
return sdb.newWorkingSet(ctx, height)
}

// PutBlock persists all changes in RunActions() into the DB
Expand Down

0 comments on commit cbe1179

Please sign in to comment.