Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix typos #1025

Merged
merged 15 commits into from
Dec 14, 2023
2 changes: 1 addition & 1 deletion bridge-history-api/abi/backend_abi.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ type L1CommitBatchEvent struct {
BatchHash common.Hash
}

// IScrollChainBlockContext is an auto generated low-level Go binding around an user-defined struct.
// IScrollChainBlockContext is an auto generated low-level Go binding around a user-defined struct.
type IScrollChainBlockContext struct {
BlockHash common.Hash
ParentHash common.Hash
Expand Down
4 changes: 2 additions & 2 deletions bridge-history-api/crossmsg/batch_info_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ func (b *BatchInfoFetcher) fetchBatchInfo() error {
}
for from := startHeight; number >= from; from += fetchLimit {
to := from + fetchLimit - 1
// number - confirmation can never less than 0 since the for loop condition
// but watch out the overflow
// number - confirmation can never be less than 0 since the for loop condition
// but watch out for the overflow
if to > number {
to = number
}
Expand Down
2 changes: 1 addition & 1 deletion bridge-history-api/crossmsg/cross_msg_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func (c *MsgFetcher) forwardFetchAndSaveMissingEvents(confirmation uint64) {
if to > number {
to = number
}
// watch for overflow here, tho its unlikely to happen
// watch for overflow here, though its unlikely to happen
err := c.worker.F(c.ctx, c.client, c.db, int64(from), int64(to), c.addressList)
if err != nil {
log.Error(fmt.Sprintf("%s: failed!", c.worker.Name), "err", err)
Expand Down
2 changes: 1 addition & 1 deletion bridge-history-api/crossmsg/messageproof/withdraw_trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"bridge-history-api/utils"
)

// MaxHeight is the maximum possible height of withdraw trie
// MaxHeight is the maximum possible height of withdrawal trie
const MaxHeight = 40

// WithdrawTrie is an append only merkle trie
Expand Down
2 changes: 1 addition & 1 deletion bridge-history-api/observability/ginmetrics/middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func (m *Monitor) UseWithoutExposingEndpoint(r gin.IRoutes) {
}

// Expose adds metric path to a given router.
// The router can be different with the one passed to UseWithoutExposingEndpoint.
// The router can be different from the one passed to UseWithoutExposingEndpoint.
// This allows to expose metrics on different port.
func (m *Monitor) Expose(r gin.IRoutes) {
r.GET(m.metricPath, func(ctx *gin.Context) {
Expand Down
4 changes: 2 additions & 2 deletions bridge-history-api/observability/ginmetrics/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ var (
}
)

// Monitor is an object that uses to set gin server monitor.
// Monitor is an object that is used to set gin server monitor.
type Monitor struct {
slowTime int32
metricPath string
Expand All @@ -63,7 +63,7 @@ func GetMonitor(reg prometheus.Registerer) *Monitor {
return monitor
}

// GetMetric used to get metric object by metric_name.
// GetMetric is used to get metric object by metric_name.
func (m *Monitor) GetMetric(name string) *Metric {
if metric, ok := m.metrics[name]; ok {
return metric
Expand Down
2 changes: 1 addition & 1 deletion bridge-history-api/observability/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import (
"bridge-history-api/utils"
)

// Server starts the metrics server on the given address, will be closed when the given
// Server starts the metrics server on the given address, which will be closed when the given
// context is canceled.
func Server(c *cli.Context, db *gorm.DB) {
if !c.Bool(utils.MetricsEnabled.Name) {
Expand Down
2 changes: 1 addition & 1 deletion build/.golangci.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Source: https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
# options for analysis running
run:
# default concurrency is a available CPU number
# default concurrency is the available CPU number
concurrency: 4

# timeout for analysis, e.g. 30s, 5m, default is 1m
Expand Down
2 changes: 1 addition & 1 deletion common/cmd/cmd_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *Cmd) WaitExit() {
select {
case err = <-c.ErrChan:
if err != nil {
fmt.Printf("%s appear error durning running, err: %v\n", c.name, err)
fmt.Printf("%s appear error during running, err: %v\n", c.name, err)
}
default:
<-time.After(time.Millisecond * 500)
Expand Down
Loading