diff options
author | Wei-Ning Huang <w@dexon.org> | 2019-03-16 15:02:13 +0800 |
---|---|---|
committer | Wei-Ning Huang <w@dexon.org> | 2019-04-09 21:32:58 +0800 |
commit | 4e42c086e40938d107b18a2bf3555d0067dfba4a (patch) | |
tree | 67bf4f90bb7a686dbf359ce87f15eceba40a575d /dex/handler.go | |
parent | c296c4f50f9048a31679298fafa773af8cddb6f2 (diff) | |
download | dexon-4e42c086e40938d107b18a2bf3555d0067dfba4a.tar.gz dexon-4e42c086e40938d107b18a2bf3555d0067dfba4a.tar.zst dexon-4e42c086e40938d107b18a2bf3555d0067dfba4a.zip |
dex: rename lattice to core
Diffstat (limited to 'dex/handler.go')
-rw-r--r-- | dex/handler.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/dex/handler.go b/dex/handler.go index efd0538f4..76219c747 100644 --- a/dex/handler.go +++ b/dex/handler.go @@ -790,7 +790,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { // Block proposer-only messages. - case msg.Code == LatticeBlockMsg: + case msg.Code == CoreBlockMsg: if !pm.isBlockProposer { break } @@ -871,7 +871,7 @@ func (pm *ProtocolManager) handleMsg(p *peer) error { } blocks := pm.cache.blocks(hashes) log.Debug("Push blocks", "blocks", blocks) - return p.SendLatticeBlocks(blocks) + return p.SendCoreBlocks(blocks) case msg.Code == PullVotesMsg: if !pm.isBlockProposer { break @@ -991,11 +991,11 @@ func (pm *ProtocolManager) BroadcastRecords(records []*enr.Record) { } } -// BroadcastLatticeBlock broadcasts the lattice block to all its peers. -func (pm *ProtocolManager) BroadcastLatticeBlock(block *coreTypes.Block) { +// BroadcastCoreBlock broadcasts the core block to all its peers. +func (pm *ProtocolManager) BroadcastCoreBlock(block *coreTypes.Block) { pm.cache.addBlock(block) for _, peer := range pm.peers.Peers() { - peer.AsyncSendLatticeBlocks([]*coreTypes.Block{block}) + peer.AsyncSendCoreBlocks([]*coreTypes.Block{block}) } } |