mirror of
https://github.com/scroll-tech/scroll.git
synced 2026-01-09 14:08:03 -05:00
docs: fix typos (#1025)
Co-authored-by: HAOYUatHZ <37070449+HAOYUatHZ@users.noreply.github.com> Co-authored-by: georgehao <haohongfan@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user