diff --git a/cmd/x-check-mailserver/main.go b/cmd/x-check-mailserver/main.go index 4181001..b2f0d62 100644 --- a/cmd/x-check-mailserver/main.go +++ b/cmd/x-check-mailserver/main.go @@ -51,9 +51,11 @@ func main() { // setup work workConfig := WorkUnitConfig{ - From: uint32(time.Now().Add(-*duration).Unix()), - To: uint32(time.Now().Add(-5 * time.Minute).Unix()), // subtract 5 mins to cater for TTL, time skew on devices etc. - Chats: *chats, + Channels: *channels, + // starting time for the envelope query + From: uint32(time.Now().Add(-*duration).Unix()), + // subtract 5 mins to cater for TTL, time skew on devices etc. + To: uint32(time.Now().Add(-5 * time.Minute).Unix()), } var ( diff --git a/cmd/x-check-mailserver/work.go b/cmd/x-check-mailserver/work.go index c721e94..97ea10e 100644 --- a/cmd/x-check-mailserver/work.go +++ b/cmd/x-check-mailserver/work.go @@ -43,9 +43,9 @@ func NewWorkUnit(mailEnode string, config *params.NodeConfig) *WorkUnit { // WorkUnitConfig configures the execution of the work. type WorkUnitConfig struct { - From uint32 - To uint32 - Chats []string + From uint32 + To uint32 + Channels []string } // Execute runs the work. @@ -62,7 +62,7 @@ func (u *WorkUnit) Execute(config WorkUnitConfig) error { return fmt.Errorf("failed to add peer: %v", err) } - for _, chatName := range config.Chats { + for _, chatName := range config.Channels { chat := protocol.CreatePublicChat(chatName, u.messenger.Timesource()) if err := u.messenger.Join(chat); err != nil { return err diff --git a/go.mod b/go.mod index 78d6e28..069c850 100644 --- a/go.mod +++ b/go.mod @@ -12,4 +12,5 @@ require ( github.com/ethereum/go-ethereum v1.9.5 github.com/spf13/pflag v1.0.3 github.com/status-im/status-go v0.48.2 + go.uber.org/zap v1.13.0 )