From 8c250cc840c0bf14b8cd51e466cf9fff5a080b9e Mon Sep 17 00:00:00 2001 From: Jae Kwon Date: Fri, 1 Dec 2017 14:08:37 -0800 Subject: [PATCH] Move Queue to attic --- Makefile | 5 ++++- {store => _attic/store}/queue.go | 0 {store => _attic/store}/queue_test.go | 0 exports.go | 10 ++++++++++ store/iavlstore.go | 8 +++++++- store/multistore.go | 1 - types/decorators.go | 2 +- types/handler.go | 2 +- 8 files changed, 23 insertions(+), 5 deletions(-) rename {store => _attic/store}/queue.go (100%) rename {store => _attic/store}/queue_test.go (100%) create mode 100644 exports.go diff --git a/Makefile b/Makefile index 4462ce055e..773e0c2f7f 100644 --- a/Makefile +++ b/Makefile @@ -48,6 +48,9 @@ test_tutorial: bash $$script ; \ done +test_store: + @go test store/*.go + get_vendor_deps: tools @glide install @@ -70,4 +73,4 @@ clean: fresh: clean get_vendor_deps install @if [ "$(git status -s)" ]; then echo; echo "Warning: uncommited changes"; git status -s; fi -.PHONY: all build install test test_cli test_unit get_vendor_deps build-docker clean fresh benchmark +.PHONY: all build install test test_cli test_unit test_store get_vendor_deps build-docker clean fresh benchmark diff --git a/store/queue.go b/_attic/store/queue.go similarity index 100% rename from store/queue.go rename to _attic/store/queue.go diff --git a/store/queue_test.go b/_attic/store/queue_test.go similarity index 100% rename from store/queue_test.go rename to _attic/store/queue_test.go diff --git a/exports.go b/exports.go new file mode 100644 index 0000000000..19dbe6f51a --- /dev/null +++ b/exports.go @@ -0,0 +1,10 @@ +package sdk + +import ( + types "github.com/cosmos/cosmos-sdk/types" +) + +// XXX type aliases for the types/* directory +type ( + Handler = types.Handler +) diff --git a/store/iavlstore.go b/store/iavlstore.go index e44244a851..324a3958ab 100644 --- a/store/iavlstore.go +++ b/store/iavlstore.go @@ -9,7 +9,12 @@ type IAVLStore struct { // } -// XXX GUT THIS AND TURN IT INTO AN IAVLSTORE LOADER +// XXX +func NewIAVLStore() { +} + +/* +// XXX GUT THIS AND TURN IT INTO AN IAVLSTORE LOADER, LoadIAVLStore() func loadState(dbName string, cacheSize int) (*sm.State, error) { // memory backed case, just for testing if dbName == "" { @@ -39,3 +44,4 @@ func loadState(dbName string, cacheSize int) (*sm.State, error) { return sm.NewState(tree), nil } +*/ diff --git a/store/multistore.go b/store/multistore.go index f433ec719f..64cbaef8cc 100644 --- a/store/multistore.go +++ b/store/multistore.go @@ -2,7 +2,6 @@ package store import ( "fmt" - "sort" "github.com/tendermint/go-wire" dbm "github.com/tendermint/tmlibs/db" diff --git a/types/decorators.go b/types/decorators.go index 94efcbf2a6..844993f351 100644 --- a/types/decorators.go +++ b/types/decorators.go @@ -1,4 +1,4 @@ -package sdk +package types // A Decorator executes before/during/after a handler to enhance functionality. type Decorator interface { diff --git a/types/handler.go b/types/handler.go index ff10ced1c6..fbfff73930 100644 --- a/types/handler.go +++ b/types/handler.go @@ -1,4 +1,4 @@ -package sdk +package types import ( abci "github.com/tendermint/abci/types"