From bc8e5ef8bbeebd2e7dc4fd65d79e99569e09a6c3 Mon Sep 17 00:00:00 2001 From: Troy Ronda Date: Wed, 31 Jan 2018 20:03:32 -0500 Subject: [PATCH] [FAB-8003] Use stdlib sync map Change-Id: Iab2d87b5c42835c89a546be79989283936520b54 Signed-off-by: Troy Ronda --- Gopkg.lock | 8 +------- Gopkg.toml | 4 ---- pkg/fabric-client/events/eventhub.go | 5 ++--- 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/Gopkg.lock b/Gopkg.lock index ec278e83a2..6309ab279f 100644 --- a/Gopkg.lock +++ b/Gopkg.lock @@ -192,12 +192,6 @@ ] revision = "0ed95abb35c445290478a5348a7b38bb154135fd" -[[projects]] - branch = "master" - name = "golang.org/x/sync" - packages = ["syncmap"] - revision = "fd80eb99c8f653c847d294a001bdf2a3a6f768f5" - [[projects]] branch = "master" name = "golang.org/x/sys" @@ -269,6 +263,6 @@ [solve-meta] analyzer-name = "dep" analyzer-version = 1 - inputs-digest = "ed0c45d5f70559bf5f9e7b5bba092ff8f8c8aa8f79e494c88398d15e78a68ac7" + inputs-digest = "04f645d9199081a968dafab0ea4757f8a53ca8a16bdaafe781a9977f12b6809e" solver-name = "gps-cdcl" solver-version = 1 diff --git a/Gopkg.toml b/Gopkg.toml index ec04ffe750..d293136c8c 100644 --- a/Gopkg.toml +++ b/Gopkg.toml @@ -54,10 +54,6 @@ name = "golang.org/x/crypto" branch = "master" -[[constraint]] - name = "golang.org/x/sync" - branch = "master" - [[constraint]] name = "github.com/stretchr/testify" version = "1.2.0" diff --git a/pkg/fabric-client/events/eventhub.go b/pkg/fabric-client/events/eventhub.go index b222c92bdf..c4babc2af3 100755 --- a/pkg/fabric-client/events/eventhub.go +++ b/pkg/fabric-client/events/eventhub.go @@ -13,7 +13,6 @@ import ( "time" "github.com/golang/protobuf/proto" - syncmap "golang.org/x/sync/syncmap" "github.com/hyperledger/fabric-sdk-go/api/apiconfig" fab "github.com/hyperledger/fabric-sdk-go/api/apifabclient" @@ -40,11 +39,11 @@ type EventHub struct { //Used for protecting parts of code from running concurrently mtx sync.RWMutex // Map of clients registered for chaincode events - chaincodeRegistrants syncmap.Map + chaincodeRegistrants sync.Map // Array of clients registered for block events blockRegistrants []func(*common.Block) // Map of clients registered for transactional events - txRegistrants syncmap.Map + txRegistrants sync.Map // peer addr to connect to peerAddr string // peer tls certificate