Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/pr-title-linter.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: PR Title Check

permissions:
contents: read
pull-requests: write
on:
pull_request:
types: [opened, edited]
Expand Down
3 changes: 2 additions & 1 deletion ai-agent/ai_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def health_check():
raise e
except Exception as e:
logger.error(f"Health check failed: {e}")
return {"status": "unhealthy", "error": str(e)}
return {"status": "unhealthy", "error": "Health check failed due to an internal error"}

# Vault client setup
@lru_cache(maxsize=1)
Expand Down Expand Up @@ -251,3 +251,4 @@ async def poll_blockchain(web3):
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="0.0.0.0", port=8000)

5 changes: 5 additions & 0 deletions go-services/blockchain-monitor/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ import (
"context"
"fmt"
"log"
"math"
"math/big"
"errors"
"net/http"
"os"
"strconv"
Expand Down Expand Up @@ -150,6 +152,9 @@ func (s *BlockchainService) GetLatestBlock(ctx context.Context) (uint64, error)
}

func (s *BlockchainService) GetTransactionCount(ctx context.Context, blockNumber uint64) (uint, error) {
if blockNumber > uint64(math.MaxInt64) {
return 0, errors.New("block number exceeds maximum int64 value")
}
block, err := s.client.BlockByNumber(ctx, big.NewInt(int64(blockNumber)))
if err != nil {
return 0, err
Expand Down