Skip to content

Commit

Permalink
chore: enable anchor db audit in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
smrz2001 committed Aug 1, 2023
1 parent 3aed130 commit f3efb91
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions cmd/cas/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,13 +297,12 @@ func main() {
batchingConsumer.Start()
validationConsumer.Start()

// Enable auditing of the anchor DB to check for pending anchor requests that might have been missed
if configAnchorAuditEnabled, found := os.LookupEnv(models.Env_AnchorAuditEnabled); found {
if anchorAuditEnabled, err := strconv.ParseBool(configAnchorAuditEnabled); (err == nil) && anchorAuditEnabled {
wg.Add(1)
go func() {
defer wg.Done()
// Poll for requests that haven't been processed in time
// Enable auditing of the anchor DB to check for pending anchor requests that might have been missed
services.NewRequestPoller(logger, anchorDb, stateDb, validateQueue, discordHandler).Run(serverCtx)
}()
}
Expand Down
2 changes: 1 addition & 1 deletion env/.env.prod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ANCHOR_AUDIT_ENABLED=false
ANCHOR_AUDIT_ENABLED=true
ANCHOR_BATCH_LINGER=6h
ANCHOR_BATCH_SIZE=1024
ANCHOR_BATCH_MONITOR_TICK=10s
Expand Down

0 comments on commit f3efb91

Please sign in to comment.