Parcourir la source

:recycle: Cleanup unused code

Ettore Di Giacinto il y a 3 ans
Parent
commit
e91f7a9acc
3 fichiers modifiés avec 0 ajouts et 9 suppressions
  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 {
 type Store interface {
 	Add(Block)
 	Add(Block)
-	Reset()
 	Len() int
 	Len() int
 	Last() Block
 	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 {
 func (m *DiskStore) Len() int {
 	count, err := m.chain.Read("index")
 	count, err := m.chain.Read("index")
 	if err != nil {
 	if err != nil {

+ 0 - 4
pkg/blockchain/store_memory.go

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