diff --git a/ud/channelIDTracking.go b/ud/channelIDTracking.go index 31d25d1983b91339d509971643c2ede688ae6c65..6336989f5bde3cca96aac6723f4db3ad03230cce 100644 --- a/ud/channelIDTracking.go +++ b/ud/channelIDTracking.go @@ -4,10 +4,11 @@ import ( "crypto/ed25519" "encoding/json" "errors" - "gitlab.com/xx_network/primitives/netTime" "sync" "time" + "gitlab.com/xx_network/primitives/netTime" + jww "github.com/spf13/jwalterweatherman" "gitlab.com/elixxir/client/v4/channels" @@ -56,7 +57,7 @@ func saveRegistrationDisk(kv versioned.KV, reg registrationDisk) error { // registrationDisk is used to encapsulate the channel user's key pair, // lease and lease signature. type registrationDisk struct { - rwmutex sync.RWMutex + rwmutex *sync.RWMutex Registered bool PublicKey ed25519.PublicKey @@ -85,7 +86,7 @@ func (r registrationDisk) IsRegistered() bool { // Update updates the registrationDisk that is currently // stored on the kv with a new lease and lease signature. -func (r registrationDisk) Update(lease int64, signature []byte) { +func (r *registrationDisk) Update(lease int64, signature []byte) { r.rwmutex.Lock() defer r.rwmutex.Unlock()