Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
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
Prev Previous commit
Next Next commit
chore: add back require
  • Loading branch information
RodrigoVillar committed Dec 9, 2025
commit 01f0663276a8be1a142ecb527db58f87ae71721c
4 changes: 3 additions & 1 deletion tests/reexecute/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"fmt"

"github.com/prometheus/client_golang/prometheus"
"github.com/stretchr/testify/require"

"github.com/ava-labs/avalanchego/database"
"github.com/ava-labs/avalanchego/database/leveldb"
Expand All @@ -32,14 +33,15 @@ type BlockResult struct {
//
// Any validation errors or iteration errors are sent as BlockResult with Err set, then the channel is closed.
func CreateBlockChanFromLevelDB(tc tests.TestContext, sourceDir string, startBlock, endBlock uint64, chanSize int) (<-chan BlockResult, error) {
r := require.New(tc)
ch := make(chan BlockResult, chanSize)

db, err := leveldb.New(sourceDir, nil, logging.NoLog{}, prometheus.NewRegistry())
if err != nil {
return nil, fmt.Errorf("failed to create leveldb database from %q: %w", sourceDir, err)
}
tc.DeferCleanup(func() {
db.Close()
r.NoError(db.Close())
})

go func() {
Expand Down