Skip to content

Commit

Permalink
remove unused DeleteBlock method
Browse files Browse the repository at this point in the history
  • Loading branch information
snissn committed Aug 12, 2024
1 parent 52604e9 commit 4de5f71
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions blockstore/badger/versions/badger_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"io"

"github.com/dgraph-io/ristretto"
"github.com/ipfs/go-cid"
)

// BadgerDB defines the common interface for both v2 and v4 versions of Badger.
Expand All @@ -28,7 +27,6 @@ type BadgerDB interface {
Size() (lsm int64, vlog int64)
Copy(ctx context.Context, to BadgerDB) error
Load(r io.Reader, maxPendingWrites int) error
DeleteBlock(context.Context, cid.Cid) error
Backup(w io.Writer, since uint64) (uint64, error)
}

Expand Down
6 changes: 0 additions & 6 deletions blockstore/badger/versions/badger_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ package versions

import (
"context"
"fmt"
"io"
"runtime"

badger "github.com/dgraph-io/badger/v2"
"github.com/dgraph-io/badger/v2/pb"
"github.com/dgraph-io/ristretto"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)

Expand Down Expand Up @@ -152,10 +150,6 @@ func (b *BadgerV2) Load(r io.Reader, maxPendingWrites int) error {
return b.DB.Load(r, maxPendingWrites)
}

func (b *BadgerV2) DeleteBlock(context.Context, cid.Cid) error {
return fmt.Errorf("DeleteBlock is not implemented")
}

func (b *BadgerV2) Backup(w io.Writer, since uint64) (uint64, error) {
return b.DB.Backup(w, since)
}
Expand Down
5 changes: 0 additions & 5 deletions blockstore/badger/versions/badger_v4.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
"github.com/dgraph-io/badger/v4/pb"
"github.com/dgraph-io/ristretto"
"github.com/dgraph-io/ristretto/z"
"github.com/ipfs/go-cid"
"golang.org/x/xerrors"
)

Expand Down Expand Up @@ -147,10 +146,6 @@ func (b *BadgerV4) Load(r io.Reader, maxPendingWrites int) error {
return b.DB.Load(r, maxPendingWrites)
}

func (b *BadgerV4) DeleteBlock(context.Context, cid.Cid) error {
return fmt.Errorf("DeleteBlock is not implemented")
}

func (b *BadgerV4) Backup(w io.Writer, since uint64) (uint64, error) {
return b.DB.Backup(w, since)
}
Expand Down

0 comments on commit 4de5f71

Please sign in to comment.