Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion plugin/evm/vm_database.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func (vm *VM) initializeDBs(db avalanchedatabase.Database) {
func (vm *VM) inspectDatabases() error {
start := time.Now()
log.Info("Starting database inspection")
if err := rawdb.InspectDatabase(vm.chaindb, nil, nil); err != nil {
if err := rawdb.InspectDatabase(vm.chaindb, nil, nil, rawdb.WithSkipFreezers()); err != nil {
return err
}
if err := inspectDB(vm.acceptedBlockDB, "acceptedBlockDB"); err != nil {
Expand Down
12 changes: 12 additions & 0 deletions plugin/evm/vm_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"time"

"github.com/ava-labs/avalanchego/database"
"github.com/ava-labs/avalanchego/database/memdb"
"github.com/ava-labs/avalanchego/ids"
"github.com/ava-labs/avalanchego/snow/engine/snowman/block"
"github.com/ava-labs/avalanchego/snow/snowtest"
Expand Down Expand Up @@ -2421,3 +2422,14 @@
})
}
}

func TestInspectDatabases(t *testing.T) {
var (
vm = newDefaultTestVM()
db = memdb.New()
)

vm.initializeDBs(db)
require.NoError(t, vm.inspectDatabases())
}
}

Check failure on line 2435 in plugin/evm/vm_test.go

View workflow job for this annotation

GitHub Actions / Golang Unit Tests (ubuntu-22.04)

expected declaration, found '}'

Check failure on line 2435 in plugin/evm/vm_test.go

View workflow job for this annotation

GitHub Actions / Golang Unit Tests (macos-latest)

expected declaration, found '}'

Check failure on line 2435 in plugin/evm/vm_test.go

View workflow job for this annotation

GitHub Actions / Lint

expected declaration, found '}' (typecheck)

Check failure on line 2435 in plugin/evm/vm_test.go

View workflow job for this annotation

GitHub Actions / Lint

syntax error: non-declaration statement outside function body (typecheck)

Check failure on line 2435 in plugin/evm/vm_test.go

View workflow job for this annotation

GitHub Actions / Golang Unit Tests (ubuntu-latest)

expected declaration, found '}'

Check failure on line 2435 in plugin/evm/vm_test.go

View workflow job for this annotation

GitHub Actions / Golang Unit Tests (ubuntu-latest)

expected declaration, found '}'
Loading