浏览代码

:recycle: Cleanup unused code

Ettore Di Giacinto 3 年之前
父节点
当前提交
e91f7a9acc
共有 3 个文件被更改,包括 0 次插入9 次删除
  1. 0 1
      pkg/blockchain/ledger.go
  2. 0 4
      pkg/blockchain/store_disk.go
  3. 0 4
      pkg/blockchain/store_memory.go

+ 0 - 1
pkg/blockchain/ledger.go

@@ -24,7 +24,6 @@ type Ledger struct {
 
 type Store interface {
 	Add(Block)
-	Reset()
 	Len() int
 	Last() Block
 }

+ 0 - 4
pkg/blockchain/store_disk.go

@@ -23,10 +23,6 @@ func (m *DiskStore) Add(b Block) {
 
 }
 
-func (m *DiskStore) Reset() {
-	m.chain.EraseAll()
-}
-
 func (m *DiskStore) Len() int {
 	count, err := m.chain.Read("index")
 	if err != nil {

+ 0 - 4
pkg/blockchain/store_memory.go

@@ -8,10 +8,6 @@ func (m *MemoryStore) Add(b Block) {
 	m.block = &b
 }
 
-func (m *MemoryStore) Reset() {
-	m.block = &Block{}
-}
-
 func (m *MemoryStore) Len() int {
 	return m.block.Index
 }