Skip to content

Commit f9ba15c

Browse files
authored
Merge pull request #6504 from goldlinker/master
chore: fix a large number of spelling issues
2 parents a9b54da + 795c33a commit f9ba15c

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

app/node/inspector_api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ func (g *inspector) Disk() (*DiskInfo, error) {
127127
}, nil
128128
}
129129

130-
// Memory return information about system meory usage.
130+
// Memory return information about system memory usage.
131131
func (g *inspector) Memory() (*MemoryInfo, error) {
132132
meminfo, err := sysi.MemoryInfo()
133133
if err != nil {

app/node/test/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ func (cs *ChainSeed) GiveKey(ctx context.Context, t *testing.T, nd *node.Node, k
7979
return addr
8080
}
8181

82-
// GiveMiner gives the specified miner to the node. Returns the address and the owner addresss
82+
// GiveMiner gives the specified miner to the node. Returns the address and the owner address
8383
func (cs *ChainSeed) GiveMiner(t *testing.T, nd *node.Node, which int) (address.Address, address.Address) {
8484
t.Helper()
8585
cfg := nd.Repo().Config()

app/submodule/network/network_submodule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ func retrieveNetworkName(ctx context.Context, genCid cid.Cid, cborStore cbor.Ipl
346346
return appstate.NewView(cborStore, genesis.ParentStateRoot).InitNetworkName(ctx)
347347
}
348348

349-
// address determines if we are publically dialable. If so use public
349+
// address determines if we are publicly dialable. If so use public
350350
// address, if not configure node to announce relay address.
351351
func buildHost(_ context.Context, config networkConfig, libP2pOpts []libp2p.Option, cfg *config.Config) (types.RawHost, error) {
352352
if config.IsRelay() {

cmd/daemon.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ var daemonCmd = &cmds.Command{
4545
cmds.StringOption(makeGenFlag, "make genesis"),
4646
cmds.StringOption(preTemplateFlag, "template for make genesis"),
4747
cmds.StringOption(SwarmAddress, "multiaddress to listen on for filecoin network connections"),
48-
cmds.StringOption(SwarmPublicRelayAddress, "public multiaddress for routing circuit relay traffic. Necessary for relay nodes to provide this if they are not publically dialable"),
48+
cmds.StringOption(SwarmPublicRelayAddress, "public multiaddress for routing circuit relay traffic. Necessary for relay nodes to provide this if they are not publicly dialable"),
4949
cmds.BoolOption(OfflineMode, "start the node without networking"),
5050
cmds.BoolOption(ELStdout),
5151
cmds.BoolOption(ULimit, "manage open file limit").WithDefault(true),

documentation/zh/sync.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
## 2. 同步流程
2222
`venus/app/submodule/syncer/syncer_submodule.go``Start()`方法会启动 一个for循环,不停的接受订阅`/fil/blocks/#{networkName}`的区块信息,然后调用`handleIncomingBlocks()`方法处理收到的区块。处理方法逻辑也非常简单,只有两个动作,一个是把收到的区块header存储到数据库。另一动作是开启一个goroutine,在goroutine里面请求一下header对应的messages(但是不存储,奇怪,为什么不存储呐?),然后把header通过调用`pkg/chainsync/dispatcher/dispatcher.go::SendGossipBlock()`方法把区块header广播出去。
2323

24-
不管是`SendGossipBlock()`还是`SendOwnBlock()`,两个方法都是把要发送出去的参数放进`imcomming`的一个channel,然后`processingIncoming()`会通过for循环不停的读取`incoming`channel的信息,然后把信息通过调用`pkc/chainsync/types/target_tracker.go::Add()`方法,把`Target`对象放入`TargetTracker`对象,这个对象主要作用是一个优先级队列。
24+
不管是`SendGossipBlock()`还是`SendOwnBlock()`,两个方法都是把要发送出去的参数放进`incoming`的一个channel,然后`processingIncoming()`会通过for循环不停的读取`incoming`channel的信息,然后把信息通过调用`pkc/chainsync/types/target_tracker.go::Add()`方法,把`Target`对象放入`TargetTracker`对象,这个对象主要作用是一个优先级队列。
2525

2626
`pkg/chainsync/dispatcher/dispatcher.go::syncWoker()`方法是在系统启动时就开启的一个for循环goroutine,方法会监听一个target的channel,每当有新的target通过`target_tracker::Add()`加入到队列时,就会触发channel,`syncWorkder()`方法内部就会调用`selectTarget()`来获取优先级最高的target,然后开启一个goroutine去调用`syncer.HandleNewTipSet()`方法来获取一系列tipset,对tipset的block进行验证,计算里面的messsage,修改区块状态。
2727

0 commit comments

Comments
 (0)