mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-26 19:42:23 +00:00
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.
31 lines
468 B
Go
31 lines
468 B
Go
package core
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
|
|
"github.com/CityOfZion/neo-go/pkg/util"
|
|
"github.com/syndtr/goleveldb/leveldb/opt"
|
|
)
|
|
|
|
const (
|
|
path = "test_chain"
|
|
)
|
|
|
|
func TestPersistBlock(t *testing.T) {
|
|
}
|
|
|
|
func newBlockchain() *Blockchain {
|
|
startHash, _ := util.Uint256DecodeString("a")
|
|
opts := &opt.Options{}
|
|
store, _ := NewLevelDBStore(path, opts)
|
|
chain := NewBlockchain(
|
|
store,
|
|
startHash,
|
|
)
|
|
return chain
|
|
}
|
|
|
|
func tearDown() error {
|
|
return os.RemoveAll(path)
|
|
}
|