Skip to content

Commit

Permalink
hiding write error console log for non validators
Browse files Browse the repository at this point in the history
  • Loading branch information
jdutchak committed Jul 16, 2024
1 parent fa37b7a commit 6b0ba02
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
26 changes: 14 additions & 12 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,32 @@
# Node Configuration
BOOTNODES=

API_KEY=
# API_KEY=

ENV=
FILE_PATH=.
PORT=8080
RPC_URL=https://ethereum-sepolia.publicnode.com
VALIDATOR=false

# VALIDATOR=true

# AI LLM
CLAUDE_API_KEY=
CLAUDE_API_URL=
CLAUDE_API_VERSION=
ELAB_KEY=
# CLAUDE_API_KEY=
# CLAUDE_API_URL=
# CLAUDE_API_VERSION=
# ELAB_KEY=

# For use with ollama https://hub.docker.com/r/ollama/ollama
LLM_SERVER=false
LLM_CHAT_URL=http://localhost:11434/api/chat
# LLM_SERVER=false
# LLM_CHAT_URL=http://localhost:11434/api/chat

# For use with bring your own Cloudflare worker token
LLM_CF_URL=
LLM_CF_TOKEN=
# LLM_CF_URL=
# LLM_CF_TOKEN=

# For use with bring your own OpenAI api key
OPENAI_API_KEY=
PROMPT="You are a helpful assistant."
# OPENAI_API_KEY=
# PROMPT="You are a helpful assistant."

# For use with bring your own Twitter credentials
# TWITTER_USER=
Expand Down
4 changes: 3 additions & 1 deletion pkg/workers/workers.go
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ func updateRecords(node *masa.OracleNode, workEvent db.WorkEvent) {
}
err = db.WriteData(node, workEvent.PeerId, jsonData)
if err != nil {
logrus.Errorf("Failed to write node data for peer ID %s: %v", workEvent.PeerId, err)
if node.IsValidator {
logrus.Errorf("Failed to write node data for peer ID %s: %v", workEvent.PeerId, err)
}
return
}
logrus.Infof("[+] Updated records key %s for node %s", workEvent.CID, workEvent.PeerId)
Expand Down

0 comments on commit 6b0ba02

Please sign in to comment.