neoneo-go/pkg/core/memory_store.go
Anthony De Meulemeester aa4bc1b6e8
Node improvements (#47)
* block partial persist

* replaced refactored files with old one.

* removed gokit/log from deps

* Tweaks to not overburden remote nodes with getheaders/getblocks

* Changed Transporter interface to not take the server as argument due to a cause of race warning from the compiler

* started server test suite

* more test + return errors from message handlers

* removed --race from build

* Little improvements.
2018-03-14 10:36:59 +01:00

27 lines
705 B
Go

package core
import "github.com/syndtr/goleveldb/leveldb"
// MemoryStore is an in memory implementation of a BlockChainStorer
// that should only be used for testing.
type MemoryStore struct{}
// NewMemoryStore returns a pointer to a MemoryStore object.
func NewMemoryStore() *MemoryStore {
return &MemoryStore{}
}
// get implementes the BlockchainStorer interface.
func (m *MemoryStore) get(key []byte) ([]byte, error) {
return nil, nil
}
// write implementes the BlockchainStorer interface.
func (m *MemoryStore) write(key, value []byte) error {
return nil
}
// writeBatch implementes the BlockchainStorer interface.
func (m *MemoryStore) writeBatch(batch *leveldb.Batch) error {
return nil
}