aa4bc1b6e8
* 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.
27 lines
705 B
Go
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
|
|
}
|