diff --git a/cmd/poll.go b/cmd/poll.go index c6a24dc64f0403f64cf38e2ebbef839411bcf2c1..8ceb647b81161b95315d5d404c308c5928da50a7 100644 --- a/cmd/poll.go +++ b/cmd/poll.go @@ -153,9 +153,15 @@ func (m *RegistrationImpl) Poll(msg *pb.PermissioningPoll, auth *connect.Auth, if updateNotification.ToActivity == current.ERROR { updateNotification.Error = msg.Error } + err = m.State.SendUpdateNotification(updateNotification) + if err!=nil{ + jww.WARN.Printf("Failed to send update notification, " + + "is the update thread running?") + n.GetPollingLock().Unlock() + } // Update occurred, report it to the control thread - return response, m.State.SendUpdateNotification(updateNotification) + return response, err } // PollNdf handles the client polling for an updated NDF diff --git a/cmd/version_vars.go b/cmd/version_vars.go index 877183972e5c2c03a124dde690abe10dbb7d876d..bcb4238480295112b9c6299c4440dbd6ee15ee27 100644 --- a/cmd/version_vars.go +++ b/cmd/version_vars.go @@ -1,9 +1,9 @@ // Code generated by go generate; DO NOT EDIT. // This file was generated by robots at -// 2020-09-17 15:58:29.515505496 -0700 PDT m=+0.028148825 +// 2021-01-28 10:47:07.899147 -0600 CST m=+0.063060483 package cmd -const GITVERSION = `49721c5 Update dependencies` +const GITVERSION = `853bcda Merge branch 'XX-2875/ClientErrMaster' into 'master'` const SEMVER = "1.5.0" const DEPENDENCIES = `module gitlab.com/elixxir/registration @@ -30,10 +30,10 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.7.0 - gitlab.com/elixxir/comms v0.0.0-20200917221445-8a509560122a - gitlab.com/elixxir/crypto v0.0.0-20200731174640-0503cf80524a - gitlab.com/elixxir/primitives v0.0.0-20200708185800-a06e961280e6 - gitlab.com/xx_network/comms v0.0.0-20200916172635-6ab807c3c820 + gitlab.com/elixxir/comms v0.0.0-20201119183624-cd133e949837 + gitlab.com/elixxir/crypto v0.0.5 + gitlab.com/elixxir/primitives v0.0.0-20201007171034-21ce972dc81d + gitlab.com/xx_network/comms v0.0.0-20200918162019-06b733db60e6 ) replace google.golang.org/grpc => github.com/grpc/grpc-go v1.27.1 diff --git a/go.mod b/go.mod index 31efee7c6c7bf4f76dc337f2edad1c67bdafe99c..caef220e101dc3f3ff5566d62110a317ae0955d2 100644 --- a/go.mod +++ b/go.mod @@ -23,10 +23,10 @@ require ( github.com/spf13/jwalterweatherman v1.1.0 github.com/spf13/pflag v1.0.5 // indirect github.com/spf13/viper v1.7.0 - gitlab.com/elixxir/comms v0.0.0-20200917221445-8a509560122a - gitlab.com/elixxir/crypto v0.0.0-20200731174640-0503cf80524a - gitlab.com/elixxir/primitives v0.0.0-20200708185800-a06e961280e6 - gitlab.com/xx_network/comms v0.0.0-20200916172635-6ab807c3c820 + gitlab.com/elixxir/comms v0.0.0-20201119183624-cd133e949837 + gitlab.com/elixxir/crypto v0.0.5 + gitlab.com/elixxir/primitives v0.0.0-20201007171034-21ce972dc81d + gitlab.com/xx_network/comms v0.0.0-20200918162019-06b733db60e6 ) replace google.golang.org/grpc => github.com/grpc/grpc-go v1.27.1 diff --git a/go.sum b/go.sum index b334edf4675be4598241131c518707fea9b5c886..275a833e05e175ae4c94c53a5296e6e402bb491e 100644 --- a/go.sum +++ b/go.sum @@ -264,16 +264,23 @@ github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGr github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= gitlab.com/elixxir/comms v0.0.0-20200707210150-b8ebd0951d23/go.mod h1:OsWMZ1O/R9fOkm+PoHnR3rkXfFtipGoPs73FuKuurHY= -gitlab.com/elixxir/comms v0.0.0-20200917221445-8a509560122a h1:WsrvOH/UUkOImFg79R6O93b/ZR40KiyHNXKf2rSRXGk= -gitlab.com/elixxir/comms v0.0.0-20200917221445-8a509560122a/go.mod h1:L2Va13j2AbQkpkveOQmNzrQD37uI5NKeBhYH+LWMOx0= +gitlab.com/elixxir/comms v0.0.0-20201119183624-cd133e949837 h1:ZKh1kIdkP31vtV6QIpXCwz5TmfEXg7suuwcfu9lv7xs= +gitlab.com/elixxir/comms v0.0.0-20201119183624-cd133e949837/go.mod h1:L2Va13j2AbQkpkveOQmNzrQD37uI5NKeBhYH+LWMOx0= gitlab.com/elixxir/crypto v0.0.0-20200707005343-97f868cbd930/go.mod h1:LHBAaEf48a0/AjU118rjoworH0LgXifhAqmNX3ZRvME= gitlab.com/elixxir/crypto v0.0.0-20200731174640-0503cf80524a h1:peZpulfSqLSceA5ovtzQ5MPgQt4YbJY8FzpV2S2Nrhc= gitlab.com/elixxir/crypto v0.0.0-20200731174640-0503cf80524a/go.mod h1:LHBAaEf48a0/AjU118rjoworH0LgXifhAqmNX3ZRvME= +gitlab.com/elixxir/crypto v0.0.5 h1:QS/3PEA6Hni61r6YAV8IfneKydtZjcC5E4ZLUPrEypc= +gitlab.com/elixxir/crypto v0.0.5/go.mod h1:PFeyONfhulnM72O2wROslwhNadtnyvKAD2QLtQzAifM= gitlab.com/elixxir/primitives v0.0.0-20200706165052-9fe7a4fb99a3/go.mod h1:OQgUZq7SjnE0b+8+iIAT2eqQF+2IFHn73tOo+aV11mg= gitlab.com/elixxir/primitives v0.0.0-20200708185800-a06e961280e6 h1:7xLD8w5qAKN1YqG2UiMiN3rODUACyQME83uDlVhvWLo= gitlab.com/elixxir/primitives v0.0.0-20200708185800-a06e961280e6/go.mod h1:OQgUZq7SjnE0b+8+iIAT2eqQF+2IFHn73tOo+aV11mg= +gitlab.com/elixxir/primitives v0.0.0-20200929195204-dd3970d93573/go.mod h1:OQgUZq7SjnE0b+8+iIAT2eqQF+2IFHn73tOo+aV11mg= +gitlab.com/elixxir/primitives v0.0.0-20201007171034-21ce972dc81d h1:UTB9Aayt7UyaBMxanP3HjWFz7PhcY8U8lgBHZ+97dr4= +gitlab.com/elixxir/primitives v0.0.0-20201007171034-21ce972dc81d/go.mod h1:OQgUZq7SjnE0b+8+iIAT2eqQF+2IFHn73tOo+aV11mg= gitlab.com/xx_network/comms v0.0.0-20200916172635-6ab807c3c820 h1:vdozJQgrnznmHJLS38aOXprLKZXClnHJ9ljY/70aWuI= gitlab.com/xx_network/comms v0.0.0-20200916172635-6ab807c3c820/go.mod h1:J+GJ6fn71a4xnYVvbcrhtvWSOQIqqhaGcaej5xB3/JY= +gitlab.com/xx_network/comms v0.0.0-20200918162019-06b733db60e6 h1:qBR6vf6Mkmv00LBcQm3Rd1+RreVcbzsYqJCGDXVGc84= +gitlab.com/xx_network/comms v0.0.0-20200918162019-06b733db60e6/go.mod h1:J+GJ6fn71a4xnYVvbcrhtvWSOQIqqhaGcaej5xB3/JY= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= diff --git a/storage/state.go b/storage/state.go index 96eb0fbe5cfd0f9b71fffa919162e4a9f81d8a64..ffa96c7d60501c1be148607214b878bc61d193c9 100644 --- a/storage/state.go +++ b/storage/state.go @@ -25,7 +25,7 @@ import ( "time" ) -const updateBufferLength = 1000 +const updateBufferLength = 10000 // NetworkState structure used for keeping track of NDF and Round state. type NetworkState struct { diff --git a/storage/stateID.go b/storage/stateID.go index 6948fefbb1d96348da0e81737395a60f2819a6d4..a7a315fadb660021da1c8e96da5d2edcdc7bb669 100644 --- a/storage/stateID.go +++ b/storage/stateID.go @@ -68,7 +68,7 @@ func (rid *stateID) increment() (uint64, error) { idBytes := []byte(strconv.FormatUint(newID, 10)) err := utils.WriteFile(rid.path, idBytes, utils.FilePerms, utils.DirPerms) if err != nil { - return 0, err + return 0, errors.WithMessagef(err, "can't update to %d", newID) } } else { jww.WARN.Printf("The state ID path is empty, updating ID file skipped.")