Skip to content

Commit

Permalink
Remove unimplemented funcitons
Browse files Browse the repository at this point in the history
Signed-off-by: manish <manish.sethi@gmail.com>
  • Loading branch information
manish-sethi authored and denyeart committed Nov 10, 2020
1 parent c590e37 commit 421dddf
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 457 deletions.
142 changes: 0 additions & 142 deletions core/chaincode/mock/peer_ledger.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions core/committer/txvalidator/v14/validator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1546,14 +1546,6 @@ func (m *mockLedger) CancelSnapshotRequest(height uint64) error {
return nil
}

func (m *mockLedger) ListSnapshots() ([]string, error) {
return nil, nil
}

func (m *mockLedger) DeleteSnapshot(height uint64) error {
return nil
}

// mockQueryExecutor mock of the query executor,
// needed to simulate inability to access state db, e.g.
// the case where due to db failure it's not possible to
Expand Down
11 changes: 0 additions & 11 deletions core/ledger/kvledger/snapshot_mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,17 +77,6 @@ func (l *kvLedger) PendingSnapshotRequests() ([]uint64, error) {
return l.snapshotMgr.snapshotRequestBookkeeper.list()
}

// ListSnapshots returns the information for available snapshots.
func (l *kvLedger) ListSnapshots() ([]string, error) {
return nil, errors.Errorf("not implemented")
}

// DeleteSnapshot deletes the snapshot files except for the metadata file and
// returns an error if no such a snapshot exists
func (l *kvLedger) DeleteSnapshot(blockNumber uint64) error {
return errors.Errorf("not implemented")
}

// processSnapshotMgmtEvents handles each event in the events channel and performs synchronization acorss
// block commits, snapshot generation, and snapshot request submission/cancellation.
// It should be started in a separate goroutine when the ledger is created/opened.
Expand Down
12 changes: 0 additions & 12 deletions core/ledger/ledger_interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,18 +218,6 @@ type PeerLedger interface {
CancelSnapshotRequest(height uint64) error
// PendingSnapshotRequests returns a list of heights for the pending (or under processing) snapshot requests.
PendingSnapshotRequests() ([]uint64, error)
// ListSnapshots returns the information for available snapshots.
// It returns a list of strings representing the following JSON object:
// type snapshotSignableMetadata struct {
// ChannelName string `json:"channel_name"`
// ChannelHeight uint64 `json:"channel_height"`
// LastBlockHashInHex string `json:"last_block_hash"`
// FilesAndHashes map[string]string `json:"snapshot_files_raw_hashes"`
// }
ListSnapshots() ([]string, error)
// DeleteSnapshot deletes the snapshot files except the metadata file.
// It returns an error if no such a snapshot exists.
DeleteSnapshot(height uint64) error
}

// SimpleQueryExecutor encapsulates basic functions
Expand Down
Loading

0 comments on commit 421dddf

Please sign in to comment.