diff --git a/bddtests/chaincode.go b/bddtests/chaincode.go index b682ef0b964..3d60b209344 100644 --- a/bddtests/chaincode.go +++ b/bddtests/chaincode.go @@ -20,7 +20,7 @@ import ( "fmt" "github.com/golang/protobuf/proto" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" pb "github.com/hyperledger/fabric/protos/peer" putils "github.com/hyperledger/fabric/protos/utils" ) diff --git a/bddtests/context.go b/bddtests/context.go index 116fd034985..d4a0fba6d4c 100644 --- a/bddtests/context.go +++ b/bddtests/context.go @@ -23,7 +23,7 @@ import ( "github.com/DATA-DOG/godog" "github.com/DATA-DOG/godog/gherkin" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" ) // BDDContext represents the current context for the executing scenario. Commensurate concept of 'context' from behave testing. diff --git a/bddtests/context_endorser.go b/bddtests/context_endorser.go index fcce8072798..8f7eb659348 100644 --- a/bddtests/context_endorser.go +++ b/bddtests/context_endorser.go @@ -24,9 +24,9 @@ import ( "github.com/DATA-DOG/godog" "github.com/DATA-DOG/godog/gherkin" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode/platforms" "github.com/hyperledger/fabric/core/container" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" "github.com/hyperledger/fabric/protos/utils" "golang.org/x/net/context" diff --git a/core/util/utils.go b/common/util/utils.go similarity index 100% rename from core/util/utils.go rename to common/util/utils.go diff --git a/core/util/utils_test.go b/common/util/utils_test.go similarity index 100% rename from core/util/utils_test.go rename to common/util/utils_test.go diff --git a/core/chaincode/chaincodeexec.go b/core/chaincode/chaincodeexec.go index 64cefca9030..63cfa75d4fc 100644 --- a/core/chaincode/chaincodeexec.go +++ b/core/chaincode/chaincodeexec.go @@ -22,7 +22,7 @@ import ( "fmt" "github.com/golang/protobuf/proto" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" pb "github.com/hyperledger/fabric/protos/peer" ) diff --git a/core/chaincode/concurrency_test.go b/core/chaincode/concurrency_test.go index 371641e959c..38870175549 100644 --- a/core/chaincode/concurrency_test.go +++ b/core/chaincode/concurrency_test.go @@ -21,7 +21,7 @@ import ( "sync" "testing" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" pb "github.com/hyperledger/fabric/protos/peer" "golang.org/x/net/context" diff --git a/core/chaincode/exectransaction_test.go b/core/chaincode/exectransaction_test.go index 68b07d0d122..a9ad3842549 100644 --- a/core/chaincode/exectransaction_test.go +++ b/core/chaincode/exectransaction_test.go @@ -28,11 +28,11 @@ import ( "path/filepath" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/container" "github.com/hyperledger/fabric/core/container/ccintf" "github.com/hyperledger/fabric/core/ledger" "github.com/hyperledger/fabric/core/peer" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" putils "github.com/hyperledger/fabric/protos/utils" diff --git a/core/chaincode/handler.go b/core/chaincode/handler.go index 21356b1707c..183613247b8 100644 --- a/core/chaincode/handler.go +++ b/core/chaincode/handler.go @@ -24,9 +24,9 @@ import ( "time" "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric/common/util" ccintf "github.com/hyperledger/fabric/core/container/ccintf" "github.com/hyperledger/fabric/core/ledger" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" "github.com/looplab/fsm" logging "github.com/op/go-logging" diff --git a/core/chaincode/lccc.go b/core/chaincode/lccc.go index a4cb5390f9f..d835d44ffa7 100644 --- a/core/chaincode/lccc.go +++ b/core/chaincode/lccc.go @@ -22,10 +22,10 @@ import ( "strings" "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/core/ledger" "github.com/hyperledger/fabric/core/peer" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" "github.com/op/go-logging" "golang.org/x/net/context" diff --git a/core/chaincode/platforms/car/hash.go b/core/chaincode/platforms/car/hash.go index 98c82b5ebee..9b1848c84ce 100644 --- a/core/chaincode/platforms/car/hash.go +++ b/core/chaincode/platforms/car/hash.go @@ -22,7 +22,7 @@ import ( "io/ioutil" "github.com/golang/protobuf/proto" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" pb "github.com/hyperledger/fabric/protos/peer" ) diff --git a/core/chaincode/platforms/car/test/car_test.go b/core/chaincode/platforms/car/test/car_test.go index 616b0906bf4..cba13023e02 100644 --- a/core/chaincode/platforms/car/test/car_test.go +++ b/core/chaincode/platforms/car/test/car_test.go @@ -20,9 +20,9 @@ import ( "os" "testing" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/config" "github.com/hyperledger/fabric/core/container" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" ) diff --git a/core/chaincode/platforms/golang/hash.go b/core/chaincode/platforms/golang/hash.go old mode 100755 new mode 100644 index f00406fa959..f6f246cd54c --- a/core/chaincode/platforms/golang/hash.go +++ b/core/chaincode/platforms/golang/hash.go @@ -33,8 +33,8 @@ import ( "github.com/op/go-logging" "github.com/spf13/viper" + "github.com/hyperledger/fabric/common/util" ccutil "github.com/hyperledger/fabric/core/chaincode/platforms/util" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" ) diff --git a/core/chaincode/platforms/java/hash.go b/core/chaincode/platforms/java/hash.go index 40d1638dfe0..fc7d0cd7b17 100644 --- a/core/chaincode/platforms/java/hash.go +++ b/core/chaincode/platforms/java/hash.go @@ -27,8 +27,8 @@ import ( "strings" "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric/common/util" ccutil "github.com/hyperledger/fabric/core/chaincode/platforms/util" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" ) diff --git a/core/chaincode/platforms/java/test/java_test.go b/core/chaincode/platforms/java/test/java_test.go index bbc8ef21ac8..223ede258d3 100644 --- a/core/chaincode/platforms/java/test/java_test.go +++ b/core/chaincode/platforms/java/test/java_test.go @@ -20,9 +20,9 @@ import ( "os" "testing" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/config" "github.com/hyperledger/fabric/core/container" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" ) diff --git a/core/chaincode/platforms/util/utils.go b/core/chaincode/platforms/util/utils.go index c2f3c2afaa1..28abe118936 100644 --- a/core/chaincode/platforms/util/utils.go +++ b/core/chaincode/platforms/util/utils.go @@ -8,8 +8,8 @@ import ( "os" "path/filepath" + "github.com/hyperledger/fabric/common/util" cutil "github.com/hyperledger/fabric/core/container/util" - "github.com/hyperledger/fabric/core/util" "github.com/op/go-logging" ) diff --git a/core/chaincode/platforms/util/utils_test.go b/core/chaincode/platforms/util/utils_test.go index a7cfb4b400b..170416874e3 100644 --- a/core/chaincode/platforms/util/utils_test.go +++ b/core/chaincode/platforms/util/utils_test.go @@ -7,7 +7,7 @@ import ( "testing" "time" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" ) // TestHashContentChange changes a random byte in a content and checks for hash change diff --git a/core/chaincode/shim/chaincode.go b/core/chaincode/shim/chaincode.go index c1a64e6b626..bdad14c08b8 100644 --- a/core/chaincode/shim/chaincode.go +++ b/core/chaincode/shim/chaincode.go @@ -30,8 +30,8 @@ import ( "github.com/golang/protobuf/proto" "github.com/golang/protobuf/ptypes/timestamp" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/comm" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" "github.com/op/go-logging" "github.com/spf13/viper" diff --git a/core/chaincode/sysccapi.go b/core/chaincode/sysccapi.go index 00ac8870db8..a478fa62e5a 100644 --- a/core/chaincode/sysccapi.go +++ b/core/chaincode/sysccapi.go @@ -21,11 +21,11 @@ import ( "golang.org/x/net/context" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/core/container/inproccontroller" "github.com/hyperledger/fabric/core/ledger" "github.com/hyperledger/fabric/core/peer" - "github.com/hyperledger/fabric/core/util" "github.com/op/go-logging" "github.com/spf13/viper" diff --git a/core/chaincode/systemchaincode_test.go b/core/chaincode/systemchaincode_test.go index 4756b1a099e..30cc691b7fe 100644 --- a/core/chaincode/systemchaincode_test.go +++ b/core/chaincode/systemchaincode_test.go @@ -22,9 +22,9 @@ import ( "testing" "time" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/peer" "github.com/hyperledger/fabric/core/system_chaincode/samplesyscc" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" "github.com/spf13/viper" "golang.org/x/net/context" diff --git a/core/chaincode/upgrade_test.go b/core/chaincode/upgrade_test.go index ffba90f12c4..1844391d423 100644 --- a/core/chaincode/upgrade_test.go +++ b/core/chaincode/upgrade_test.go @@ -21,7 +21,7 @@ import ( "strings" "testing" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" pb "github.com/hyperledger/fabric/protos/peer" "github.com/golang/protobuf/proto" diff --git a/core/committer/txvalidator/txvalidator_test.go b/core/committer/txvalidator/txvalidator_test.go index bc1ac7413b5..8a28ec0702e 100644 --- a/core/committer/txvalidator/txvalidator_test.go +++ b/core/committer/txvalidator/txvalidator_test.go @@ -20,10 +20,10 @@ import ( "testing" "github.com/golang/protobuf/proto" + util2 "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/ledger/ledgermgmt" "github.com/hyperledger/fabric/core/ledger/testutil" "github.com/hyperledger/fabric/core/ledger/util" - util2 "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric/protos/peer" "github.com/hyperledger/fabric/protos/utils" diff --git a/core/committer/txvalidator/validator.go b/core/committer/txvalidator/validator.go index b0bf44a9cb2..27d3d9138ec 100644 --- a/core/committer/txvalidator/validator.go +++ b/core/committer/txvalidator/validator.go @@ -21,11 +21,11 @@ import ( "fmt" "github.com/golang/protobuf/proto" + coreUtil "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode" "github.com/hyperledger/fabric/core/ledger" ledgerUtil "github.com/hyperledger/fabric/core/ledger/util" "github.com/hyperledger/fabric/core/peer" - coreUtil "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/protos/common" "github.com/hyperledger/fabric/protos/utils" "github.com/op/go-logging" diff --git a/core/container/ccintf/ccintf.go b/core/container/ccintf/ccintf.go index 4ea221d01b0..bd2acab37fa 100644 --- a/core/container/ccintf/ccintf.go +++ b/core/container/ccintf/ccintf.go @@ -23,7 +23,7 @@ package ccintf import ( "encoding/hex" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" pb "github.com/hyperledger/fabric/protos/peer" "golang.org/x/net/context" ) diff --git a/core/container/vm_test.go b/core/container/vm_test.go index e6400520010..7c9daa37e2f 100644 --- a/core/container/vm_test.go +++ b/core/container/vm_test.go @@ -24,8 +24,8 @@ import ( "os" "testing" + "github.com/hyperledger/fabric/common/util" cutil "github.com/hyperledger/fabric/core/container/util" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" "golang.org/x/net/context" ) diff --git a/core/endorser/endorser.go b/core/endorser/endorser.go index bcdc2f096fc..5b1f32fd590 100644 --- a/core/endorser/endorser.go +++ b/core/endorser/endorser.go @@ -23,10 +23,10 @@ import ( "github.com/op/go-logging" "golang.org/x/net/context" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode" "github.com/hyperledger/fabric/core/ledger" "github.com/hyperledger/fabric/core/peer" - "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/msp" "github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric/protos/peer" diff --git a/core/endorser/endorser_test.go b/core/endorser/endorser_test.go index 372f46952a8..8fb01c22bc9 100644 --- a/core/endorser/endorser_test.go +++ b/core/endorser/endorser_test.go @@ -26,11 +26,11 @@ import ( "path/filepath" "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode" "github.com/hyperledger/fabric/core/container" "github.com/hyperledger/fabric/core/peer" "github.com/hyperledger/fabric/core/peer/msp" - "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/msp" pb "github.com/hyperledger/fabric/protos/peer" pbutils "github.com/hyperledger/fabric/protos/utils" diff --git a/core/ledger/kvledger/example/app.go b/core/ledger/kvledger/example/app.go index 1dc87faf3c4..44fbb8279b7 100644 --- a/core/ledger/kvledger/example/app.go +++ b/core/ledger/kvledger/example/app.go @@ -22,7 +22,7 @@ import ( "github.com/golang/protobuf/proto" "github.com/hyperledger/fabric/core/ledger" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/protos/common" ptestutils "github.com/hyperledger/fabric/protos/testutils" ) diff --git a/core/ledger/kvledger/txmgmt/txmgr/lockbasedtxmgr/lockbased_query_executer.go b/core/ledger/kvledger/txmgmt/txmgr/lockbasedtxmgr/lockbased_query_executer.go index 6a10156915e..6a2df0ab1c4 100644 --- a/core/ledger/kvledger/txmgmt/txmgr/lockbasedtxmgr/lockbased_query_executer.go +++ b/core/ledger/kvledger/txmgmt/txmgr/lockbasedtxmgr/lockbased_query_executer.go @@ -17,8 +17,8 @@ limitations under the License. package lockbasedtxmgr import ( + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/ledger" - "github.com/hyperledger/fabric/core/util" ) // LockBasedQueryExecutor is a query executor used in `LockBasedTxMgr` diff --git a/core/ledger/kvledger/txmgmt/txmgr/lockbasedtxmgr/lockbased_tx_simulator.go b/core/ledger/kvledger/txmgmt/txmgr/lockbasedtxmgr/lockbased_tx_simulator.go index 3f16c4a95e8..cf35f621b1a 100644 --- a/core/ledger/kvledger/txmgmt/txmgr/lockbasedtxmgr/lockbased_tx_simulator.go +++ b/core/ledger/kvledger/txmgmt/txmgr/lockbasedtxmgr/lockbased_tx_simulator.go @@ -19,8 +19,8 @@ package lockbasedtxmgr import ( "errors" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/ledger/kvledger/txmgmt/rwset" - "github.com/hyperledger/fabric/core/util" ) // LockBasedTxSimulator is a transaction simulator used in `LockBasedTxMgr` diff --git a/core/ledger/testutil/test_helper.go b/core/ledger/testutil/test_helper.go index 5d8974891bd..4a48643a370 100644 --- a/core/ledger/testutil/test_helper.go +++ b/core/ledger/testutil/test_helper.go @@ -20,7 +20,7 @@ import ( "testing" "github.com/golang/protobuf/proto" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/protos/common" ptestutils "github.com/hyperledger/fabric/protos/testutils" ) diff --git a/core/ledger/testutil/test_util.go b/core/ledger/testutil/test_util.go index 2a2f90e1782..ca0b14ccfa4 100644 --- a/core/ledger/testutil/test_util.go +++ b/core/ledger/testutil/test_util.go @@ -28,7 +28,7 @@ import ( "testing" "time" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" "github.com/op/go-logging" "github.com/spf13/viper" ) diff --git a/core/peer/fullflow_test.go b/core/peer/fullflow_test.go index 1a487910f6d..733eb769a72 100644 --- a/core/peer/fullflow_test.go +++ b/core/peer/fullflow_test.go @@ -24,8 +24,8 @@ import ( "fmt" "os" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/peer/msp" - "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/msp" "github.com/hyperledger/fabric/protos/peer" "github.com/hyperledger/fabric/protos/utils" diff --git a/core/peer/msp/config.go b/core/peer/msp/config.go index b9ab95402a9..a212f582acd 100644 --- a/core/peer/msp/config.go +++ b/core/peer/msp/config.go @@ -1,7 +1,7 @@ package mspmgmt import ( - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/msp" "github.com/hyperledger/fabric/protos/common" mspprotos "github.com/hyperledger/fabric/protos/msp" diff --git a/core/peer/msp/peermsp_test.go b/core/peer/msp/peermsp_test.go index 44d8e3a9dd7..199d1e61e96 100644 --- a/core/peer/msp/peermsp_test.go +++ b/core/peer/msp/peermsp_test.go @@ -3,7 +3,7 @@ package mspmgmt import ( "testing" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/msp" "github.com/hyperledger/fabric/protos/msp/testutils" ) diff --git a/core/system_chaincode/escc/endorser_onevalidsignature_test.go b/core/system_chaincode/escc/endorser_onevalidsignature_test.go index 2896f4570c4..428b9d5b885 100644 --- a/core/system_chaincode/escc/endorser_onevalidsignature_test.go +++ b/core/system_chaincode/escc/endorser_onevalidsignature_test.go @@ -23,10 +23,10 @@ import ( "os" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/core/peer" "github.com/hyperledger/fabric/core/peer/msp" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos/peer" putils "github.com/hyperledger/fabric/protos/utils" ) diff --git a/core/system_chaincode/vscc/validator_onevalidsignature_test.go b/core/system_chaincode/vscc/validator_onevalidsignature_test.go index 70e4b638fdb..6b7447ae14e 100644 --- a/core/system_chaincode/vscc/validator_onevalidsignature_test.go +++ b/core/system_chaincode/vscc/validator_onevalidsignature_test.go @@ -21,9 +21,9 @@ import ( "fmt" "os" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode/shim" "github.com/hyperledger/fabric/core/peer/msp" - "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/msp" "github.com/hyperledger/fabric/protos/common" "github.com/hyperledger/fabric/protos/peer" diff --git a/examples/chaincode/go/asset_management_interactive/app1/app1_internal.go b/examples/chaincode/go/asset_management_interactive/app1/app1_internal.go index 22ddc138d2a..2ff0c575cf3 100644 --- a/examples/chaincode/go/asset_management_interactive/app1/app1_internal.go +++ b/examples/chaincode/go/asset_management_interactive/app1/app1_internal.go @@ -22,13 +22,13 @@ import ( "fmt" "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode" "github.com/hyperledger/fabric/core/chaincode/platforms" "github.com/hyperledger/fabric/core/config" "github.com/hyperledger/fabric/core/container" "github.com/hyperledger/fabric/core/crypto" "github.com/hyperledger/fabric/core/peer" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos" "github.com/op/go-logging" "github.com/spf13/viper" diff --git a/examples/chaincode/go/asset_management_interactive/app2/app2_internal.go b/examples/chaincode/go/asset_management_interactive/app2/app2_internal.go index 3743c375459..7c9ddfccb71 100644 --- a/examples/chaincode/go/asset_management_interactive/app2/app2_internal.go +++ b/examples/chaincode/go/asset_management_interactive/app2/app2_internal.go @@ -26,13 +26,13 @@ import ( "strings" "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode" "github.com/hyperledger/fabric/core/chaincode/platforms" "github.com/hyperledger/fabric/core/config" "github.com/hyperledger/fabric/core/container" "github.com/hyperledger/fabric/core/crypto" "github.com/hyperledger/fabric/core/peer" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos" "github.com/op/go-logging" "github.com/spf13/viper" diff --git a/examples/chaincode/go/asset_management_interactive/app3/app3_internal.go b/examples/chaincode/go/asset_management_interactive/app3/app3_internal.go index 02a4fa23bf7..8d8fe8455f6 100644 --- a/examples/chaincode/go/asset_management_interactive/app3/app3_internal.go +++ b/examples/chaincode/go/asset_management_interactive/app3/app3_internal.go @@ -26,13 +26,13 @@ import ( "strings" "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode" "github.com/hyperledger/fabric/core/chaincode/platforms" "github.com/hyperledger/fabric/core/config" "github.com/hyperledger/fabric/core/container" "github.com/hyperledger/fabric/core/crypto" "github.com/hyperledger/fabric/core/peer" - "github.com/hyperledger/fabric/core/util" pb "github.com/hyperledger/fabric/protos" "github.com/op/go-logging" "github.com/spf13/viper" diff --git a/examples/chaincode/go/chaincode_example04/chaincode_example04.go b/examples/chaincode/go/chaincode_example04/chaincode_example04.go index f38f86418e2..9a9bcdcac37 100644 --- a/examples/chaincode/go/chaincode_example04/chaincode_example04.go +++ b/examples/chaincode/go/chaincode_example04/chaincode_example04.go @@ -21,8 +21,8 @@ import ( "fmt" "strconv" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode/shim" - "github.com/hyperledger/fabric/core/util" ) // This chaincode is a test for chaincode invoking another chaincode - invokes chaincode_example02 diff --git a/examples/chaincode/go/chaincode_example05/chaincode_example05.go b/examples/chaincode/go/chaincode_example05/chaincode_example05.go index 9c7e3297b08..dee8c97aa19 100644 --- a/examples/chaincode/go/chaincode_example05/chaincode_example05.go +++ b/examples/chaincode/go/chaincode_example05/chaincode_example05.go @@ -21,8 +21,8 @@ import ( "fmt" "strconv" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode/shim" - "github.com/hyperledger/fabric/core/util" ) // This chaincode is a test for chaincode querying another chaincode - invokes chaincode_example02 and computes the sum of a and b and stores it as state diff --git a/examples/chaincode/go/passthru/passthru.go b/examples/chaincode/go/passthru/passthru.go index 654e13e5f5f..026acfebf50 100644 --- a/examples/chaincode/go/passthru/passthru.go +++ b/examples/chaincode/go/passthru/passthru.go @@ -21,8 +21,8 @@ import ( "fmt" "strings" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode/shim" - "github.com/hyperledger/fabric/core/util" ) // PassthruChaincode passes thru invoke and query to another chaincode where diff --git a/gossip/service/gossip_service.go b/gossip/service/gossip_service.go index 0ea99011ccd..ab8afcfdc9d 100644 --- a/gossip/service/gossip_service.go +++ b/gossip/service/gossip_service.go @@ -20,9 +20,9 @@ import ( "sync" "time" + "github.com/hyperledger/fabric/common/util" peerComm "github.com/hyperledger/fabric/core/comm" "github.com/hyperledger/fabric/core/committer" - "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/gossip/api" gossipCommon "github.com/hyperledger/fabric/gossip/common" "github.com/hyperledger/fabric/gossip/gossip" diff --git a/gossip/state/state_test.go b/gossip/state/state_test.go index 6f8da5f0cd4..91dfa50b919 100644 --- a/gossip/state/state_test.go +++ b/gossip/state/state_test.go @@ -25,9 +25,9 @@ import ( "time" pb "github.com/golang/protobuf/proto" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/committer" "github.com/hyperledger/fabric/core/ledger/ledgermgmt" - "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/gossip/api" "github.com/hyperledger/fabric/gossip/comm" "github.com/hyperledger/fabric/gossip/common" @@ -61,7 +61,6 @@ func (*joinChanMsg) AnchorPeers() []api.AnchorPeer { } type orgCryptoService struct { - } // OrgByPeerIdentity returns the OrgIdentityType diff --git a/orderer/multichain/systemchain.go b/orderer/multichain/systemchain.go index 27e4dfb0e36..287dee21480 100644 --- a/orderer/multichain/systemchain.go +++ b/orderer/multichain/systemchain.go @@ -21,7 +21,7 @@ import ( "github.com/hyperledger/fabric/common/configtx" "github.com/hyperledger/fabric/common/policies" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/orderer/common/filter" "github.com/hyperledger/fabric/orderer/common/sharedconfig" cb "github.com/hyperledger/fabric/protos/common" diff --git a/orderer/multichain/systemchain_test.go b/orderer/multichain/systemchain_test.go index 23ddf5ccf4e..ee10bb6b081 100644 --- a/orderer/multichain/systemchain_test.go +++ b/orderer/multichain/systemchain_test.go @@ -22,7 +22,7 @@ import ( "time" "github.com/hyperledger/fabric/common/policies" - coreutil "github.com/hyperledger/fabric/core/util" + coreutil "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/orderer/common/bootstrap/provisional" "github.com/hyperledger/fabric/orderer/common/filter" "github.com/hyperledger/fabric/orderer/common/sharedconfig" diff --git a/peer/chaincode/chaincode.go b/peer/chaincode/chaincode.go old mode 100755 new mode 100644 index 3814b11305b..6716c231222 --- a/peer/chaincode/chaincode.go +++ b/peer/chaincode/chaincode.go @@ -19,7 +19,7 @@ package chaincode import ( "fmt" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/peer/common" "github.com/op/go-logging" "github.com/spf13/cobra" diff --git a/peer/chaincode/common.go b/peer/chaincode/common.go old mode 100755 new mode 100644 index 89e75f2cc3f..038c54275af --- a/peer/chaincode/common.go +++ b/peer/chaincode/common.go @@ -23,10 +23,10 @@ import ( "os" "strings" + cutil "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/chaincode" "github.com/hyperledger/fabric/core/chaincode/platforms" "github.com/hyperledger/fabric/core/container" - cutil "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/msp" "github.com/hyperledger/fabric/peer/common" pb "github.com/hyperledger/fabric/protos/peer" diff --git a/peer/chaincode/deploy.go b/peer/chaincode/deploy.go old mode 100755 new mode 100644 index 435fe4c9090..65579624ba1 --- a/peer/chaincode/deploy.go +++ b/peer/chaincode/deploy.go @@ -21,7 +21,7 @@ import ( "golang.org/x/net/context" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" protcommon "github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric/protos/peer" "github.com/hyperledger/fabric/protos/utils" diff --git a/peer/chaincode/upgrade.go b/peer/chaincode/upgrade.go index 7fc84560bb8..184fd58a59d 100644 --- a/peer/chaincode/upgrade.go +++ b/peer/chaincode/upgrade.go @@ -21,7 +21,7 @@ import ( "golang.org/x/net/context" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" protcommon "github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric/protos/peer" "github.com/hyperledger/fabric/protos/utils" diff --git a/peer/node/join.go b/peer/node/join.go old mode 100755 new mode 100644 index 9cb72acf0cd..c1de062410f --- a/peer/node/join.go +++ b/peer/node/join.go @@ -20,7 +20,7 @@ import ( "fmt" "io/ioutil" - cutil "github.com/hyperledger/fabric/core/util" + cutil "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/msp" "github.com/hyperledger/fabric/peer/common" pb "github.com/hyperledger/fabric/protos/peer" diff --git a/peer/node/start.go b/peer/node/start.go old mode 100755 new mode 100644 index 74568da8166..d28d75ccecb --- a/peer/node/start.go +++ b/peer/node/start.go @@ -27,6 +27,7 @@ import ( "syscall" "time" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core" "github.com/hyperledger/fabric/core/chaincode" "github.com/hyperledger/fabric/core/comm" @@ -34,7 +35,6 @@ import ( "github.com/hyperledger/fabric/core/endorser" "github.com/hyperledger/fabric/core/ledger/ledgermgmt" "github.com/hyperledger/fabric/core/peer" - "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/events/producer" "github.com/hyperledger/fabric/gossip/service" "github.com/hyperledger/fabric/peer/common" diff --git a/protos/common/block.go b/protos/common/block.go index cb6937384d6..ff2dda73601 100644 --- a/protos/common/block.go +++ b/protos/common/block.go @@ -18,7 +18,7 @@ package common import ( "github.com/golang/protobuf/proto" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" ) // NewBlock construct a block with no data and no metadata diff --git a/protos/peer/chaincodeunmarshall.go b/protos/peer/chaincodeunmarshall.go index 97ae74e177d..eeee9722b8a 100644 --- a/protos/peer/chaincodeunmarshall.go +++ b/protos/peer/chaincodeunmarshall.go @@ -19,7 +19,7 @@ package peer import ( "encoding/json" - "github.com/hyperledger/fabric/core/util" + "github.com/hyperledger/fabric/common/util" ) type strArgs struct { diff --git a/protos/utils/configuration.go b/protos/utils/configuration.go index b0bf0ea9e43..87a3d04b1ba 100644 --- a/protos/utils/configuration.go +++ b/protos/utils/configuration.go @@ -17,7 +17,7 @@ limitations under the License. package utils import ( - cu "github.com/hyperledger/fabric/core/util" + cu "github.com/hyperledger/fabric/common/util" cb "github.com/hyperledger/fabric/protos/common" ab "github.com/hyperledger/fabric/protos/orderer" ) diff --git a/protos/utils/proputils_test.go b/protos/utils/proputils_test.go index bb3145f1ee7..6c082dd59a9 100644 --- a/protos/utils/proputils_test.go +++ b/protos/utils/proputils_test.go @@ -25,8 +25,8 @@ import ( "fmt" "os" + "github.com/hyperledger/fabric/common/util" "github.com/hyperledger/fabric/core/peer/msp" - "github.com/hyperledger/fabric/core/util" "github.com/hyperledger/fabric/msp" "github.com/hyperledger/fabric/protos/common" pb "github.com/hyperledger/fabric/protos/peer"