LOADING...
LOADING...
LOADING...
当前位置:主页 > 知识列表 >

mclock

1. 深入理解以太坊P2P网络设计(下)

... ???if?srv.log?==?nil?{ ???????srv.log?=?log.Root() ??} ???if?srv.clock?==?nil?{ ???????srv.clock?=?mclock.System{} ??} ???if?srv.NoDial?&&?srv.ListenAddr?==?""?{ ???????srv.log.Warn("P2P?server?will?be?useless,?neither?dialing?nor?listening") ??} ???//?static?fields ???if?srv.PrivateKey?==?nil?{ ???????return?errors.New("Server.PrivateKey?must?be?set?to?a?non-nil?key") ??} ???if?srv.newTransport?...

知识:公钥,以太坊,节点,函数

2. 深入理解以太坊P2P网络设计(下)

... ???if?srv.log?==?nil?{ ???????srv.log?=?log.Root() ??} ???if?srv.clock?==?nil?{ ???????srv.clock?=?mclock.System{} ??} ???if?srv.NoDial?&&?srv.ListenAddr?==?""?{ ???????srv.log.Warn("P2P?server?will?be?useless,?neither?dialing?nor?listening") ??} ???//?static?fields ???if?srv.PrivateKey?==?nil?{ ???????return?errors.New("Server.PrivateKey?must?be?set?to?a?non-nil?key") ??} ???if?srv.newTransport?...

知识:公钥,以太坊,节点,函数

3. 深入理解以太坊P2P网络设计(上)

..."`NoDial?bool?`toml:",omitempty"`EnableMsgEvents?boolLogger?log.Logger?`toml:",omitempty"` ???clock?mclock.Clock }新增节点AddPeer 函数用于新增一个给定的节点,其实现代码如下所示://?filedir:go-ethereum-1.10.2\p2p\server.go?L318func?(srv?*Server)?AddPeer(node?*enode.Node)?{ ???srv.dialsched.addStatic(node) } //?filedir:go-ethereum-1.10.2\p2p\dial.go?L190 //?addStatic?adds...

知识:节点,以太坊,超级节点,网络