noble-assets / noble-cctp-relayer

Apache License 2.0
15 stars 9 forks source link

Add extra checks for `completed` messages #71

Closed boojamya closed 8 months ago

boojamya commented 8 months ago

Because of the recent flush, the same message can be dequeued from the processing queue more than once.

Ref: https://github.com/strangelove-ventures/noble-cctp-relayer/blob/d74f65466005f7a0a3292a700b9315641e017f33/cmd/process.go#L144

The PR adds extra checks to see if another worker had already completed the broadcast during each retry.

Also, this cleans up some rogue print statements.