diff --git a/cmd/eris-db.go b/cmd/eris-db.go index 9869277226da21ffe113584866ea38db28458385..f67501ecc8acb7b116bcdb60e24e0190b0f3df84 100644 --- a/cmd/eris-db.go +++ b/cmd/eris-db.go @@ -29,8 +29,6 @@ import ( version "github.com/eris-ltd/eris-db/version" ) -const VERSION = version.VERSION - // Global Do struct var do *definitions.Do @@ -44,7 +42,7 @@ your needs. Made with <3 by Eris Industries. Complete documentation is available at https://docs.erisindustries.com -` + "\nVERSION:\n " + VERSION, +` + "\nVERSION:\n " + version.VERSION, PersistentPreRun: func(cmd *cobra.Command, args []string) { log.SetLevel(log.WarnLevel) @@ -94,12 +92,6 @@ func defaultDebug() bool { return setDefaultBool("ERIS_DB_DEBUG", false) } -// defaultOutput is set to true unless the ERIS_DB_OUTPUT environment -// variable is set to a parsable boolean. -func defaultOutput() bool { - return setDefaultBool("ERIS_DB_OUTPUT", true) -} - // setDefaultBool returns the provided default value if the environment variab;e // is not set or not parsable as a bool. func setDefaultBool(environmentVariable string, defaultValue bool) bool { diff --git a/cmd/eris-db/main.go b/cmd/eris-db/main.go index a43cee9cb0f5513c4a11ec2ae20b56b3342eb893..47870377f4123834fe8b1c99474c08819da54c12 100644 --- a/cmd/eris-db/main.go +++ b/cmd/eris-db/main.go @@ -17,46 +17,9 @@ package main import ( - "github.com/eris-ltd/eris-db/cmd" + commands "github.com/eris-ltd/eris-db/cmd" ) func main() { commands.Execute() } - -// package main -// -// import ( -// "fmt" -// edb "github.com/eris-ltd/eris-db/erisdb" -// "os" -// ) -// -// // TODO the input stuff. -// func main() { -// args := os.Args[1:] -// var baseDir string -// var inProc bool -// if len(args) > 0 { -// baseDir = args[0] -// if len(args) > 1 { -// if args[1] == "inproc" { -// inProc = true -// } -// } -// } else { -// baseDir = os.Getenv("HOME") + "/.erisdb" -// } -// -// proc, errSt := edb.ServeErisDB(baseDir, inProc) -// if errSt != nil { -// panic(errSt.Error()) -// } -// errSe := proc.Start() -// if errSe != nil { -// panic(errSe.Error()) -// } -// // TODO For now. -// fmt.Println("DONTMINDME55891") -// <-proc.StopEventChannel() -// } diff --git a/test/mock/mock_web_api_test.go b/test/mock/mock_web_api_test.g_ similarity index 100% rename from test/mock/mock_web_api_test.go rename to test/mock/mock_web_api_test.g_ diff --git a/test/mock/pipe.go b/test/mock/pipe.g_ similarity index 94% rename from test/mock/pipe.go rename to test/mock/pipe.g_ index af65937511d91d854d42d610224e85def2cbc70b..61fc0398cfe6c358553d2b129f15e90c878cca2b 100644 --- a/test/mock/pipe.go +++ b/test/mock/pipe.g_ @@ -1,10 +1,13 @@ package mock import ( - account "github.com/eris-ltd/eris-db/account" - core_types "github.com/eris-ltd/eris-db/core/types" - definitions "github.com/eris-ltd/eris-db/definitions" - event "github.com/eris-ltd/eris-db/event" + "fmt" + + account "github.com/eris-ltd/eris-db/account" + core_types "github.com/eris-ltd/eris-db/core/types" + definitions "github.com/eris-ltd/eris-db/definitions" + event "github.com/eris-ltd/eris-db/event" + manager_types "github.com/eris-ltd/eris-db/manager/types" td "github.com/eris-ltd/eris-db/test/testdata/testdata" types "github.com/eris-ltd/eris-db/txs" @@ -89,6 +92,10 @@ func (this *MockPipe) SetConsensusEngine(_ definitions.ConsensusEngine) error { return nil } +func (this *MockPipe) GetTendermintPipe() (definitions.TendermintPipe, error) { + return nil, fmt.Errorf("Tendermint pipe is not supported by mocked pipe.") +} + // Components // Accounts diff --git a/test/pipe/pipe_test.go b/test/pipe/pipe_test.go deleted file mode 100644 index a7bad56631dd313106bf9739b602c21e1bd254e4..0000000000000000000000000000000000000000 --- a/test/pipe/pipe_test.go +++ /dev/null @@ -1 +0,0 @@ -package pipe diff --git a/test/testdata/filters/testdata_filters.go b/test/testdata/filters/testdata_filters.g_ similarity index 100% rename from test/testdata/filters/testdata_filters.go rename to test/testdata/filters/testdata_filters.g_ diff --git a/test/testdata/helpers.go b/test/testdata/helpers.g_ similarity index 100% rename from test/testdata/helpers.go rename to test/testdata/helpers.g_ diff --git a/test/testdata/testdata/testdata.go b/test/testdata/testdata/testdata.g_ similarity index 98% rename from test/testdata/testdata/testdata.go rename to test/testdata/testdata/testdata.g_ index 811ee65547ed07703f597d4b1958dbe090281463..d780d80a3bbf75285e298803d9d2e2eb79c52d99 100644 --- a/test/testdata/testdata/testdata.go +++ b/test/testdata/testdata/testdata.g_ @@ -1,7 +1,6 @@ package testdata import ( - wire "github.com/tendermint/go-wire" account "github.com/eris-ltd/eris-db/account" core_types "github.com/eris-ltd/eris-db/core/types" @@ -697,15 +696,10 @@ type ( ) func LoadTestData() *TestData { - var err error - //codec := core_types.NewTCodec() - testData := TestData{} - testDataI := wire.ReadJSON(testData, []byte(testDataJson), &err) - /*err := codec.DecodeBytes(testData, []byte(testDataJson)) - */ - if err != nil { + codec := rpc_v0.NewTCodec() + testData := &TestData{} + if err := codec.DecodeBytes(testData, []byte(testDataJson)); err != nil { panic(err) } - testData = testDataI.(TestData) - return &testData + return testData }