Skip to content

Commit

Permalink
add spellchecker and run (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vritra4 authored Nov 15, 2024
1 parent 13e1849 commit 4434dfb
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 3 deletions.
11 changes: 11 additions & 0 deletions .github/config/.codespellignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cips
pullrequest
keypair
pastTime
hasTables
Nam
EyT
upTo
initia
minitia
expRes
28 changes: 28 additions & 0 deletions .github/workflows/spellcheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Spell Check

on:
pull_request:

jobs:
spellcheck:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run codespell
continue-on-error: true
run: |
sudo apt-get install codespell -y
codespell -w --skip="*.pulsar.go,*.pb.go,*.pb.gw.go,*.cosmos_orm.go,*.json,*.git,*.js,crypto/keys,fuzz,*.h,proto/tendermint,*.bin,go.sum,go.work.sum,go.mod,statik.go,*.map,swagger.yaml" --ignore-words=.github/config/.codespellignore
- uses: peter-evans/[email protected]
if: github.event_name != 'pull_request'
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "chore: fix typos"
title: "chore: fix typos"
branch: "chore/fix-typos"
delete-branch: true
body: |
This PR fixes typos in the codebase.
Please review it, and merge if everything is fine.
If there are proto changes, run `make proto-gen` and commit the changes.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Used for running OPinit bots in a Docker container
#
# Useage:
# Usage:
# $ docker build --tag opinit-bots .

FROM golang:1.23-alpine AS builder
Expand Down
4 changes: 2 additions & 2 deletions node/broadcaster/process.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ func (b *Broadcaster) HandleNewBlock(block *rpccoretypes.ResultBlock, blockResul
}

// check timeout of pending txs
// @sh-cha: should we rebroadcast pending txs? or rasing monitoring alert?
// @sh-cha: should we rebroadcast pending txs? or raising monitoring alert?
if length := b.LenLocalPendingTx(); length > 0 {
b.logger.Debug("remaining pending txs", zap.Int64("height", block.Block.Height), zap.Int("count", length))
pendingTxTime := time.Unix(0, b.peekLocalPendingTx().Timestamp)
Expand Down Expand Up @@ -67,7 +67,7 @@ func (b *Broadcaster) CheckPendingTx(ctx context.Context) (*btypes.PendingTxInfo
return nil, nil, time.Time{}, err
}
if lastBlockResult.Block.Time.After(pendingTxTime.Add(b.cfg.TxTimeout)) {
// @sh-cha: should we rebroadcast pending txs? or rasing monitoring alert?
// @sh-cha: should we rebroadcast pending txs? or raising monitoring alert?
panic(fmt.Errorf("something wrong, pending txs are not processed for a long time; current block time: %s, pending tx processing time: %s", time.Now().UTC().String(), pendingTxTime.UTC().String()))
}

Expand Down

0 comments on commit 4434dfb

Please sign in to comment.