diff options
author | Wei-Ning Huang <w@dexon.org> | 2018-09-19 18:48:41 +0800 |
---|---|---|
committer | missionliao <38416648+missionliao@users.noreply.github.com> | 2018-09-19 18:48:41 +0800 |
commit | 22e70f6da486ed6796a493f25e04679b9afa1439 (patch) | |
tree | 41998daa892812957daa58d7fe84d6fd06f4327c /simulation | |
parent | a2a733e6f98018cb2ecc4b3982386be8892d7433 (diff) | |
download | dexon-consensus-22e70f6da486ed6796a493f25e04679b9afa1439.tar dexon-consensus-22e70f6da486ed6796a493f25e04679b9afa1439.tar.gz dexon-consensus-22e70f6da486ed6796a493f25e04679b9afa1439.tar.bz2 dexon-consensus-22e70f6da486ed6796a493f25e04679b9afa1439.tar.lz dexon-consensus-22e70f6da486ed6796a493f25e04679b9afa1439.tar.xz dexon-consensus-22e70f6da486ed6796a493f25e04679b9afa1439.tar.zst dexon-consensus-22e70f6da486ed6796a493f25e04679b9afa1439.zip |
core: rename Notary (Acks) to Witness (#118)
Diffstat (limited to 'simulation')
-rw-r--r-- | simulation/app.go | 4 | ||||
-rw-r--r-- | simulation/marshaller.go | 8 | ||||
-rw-r--r-- | simulation/network.go | 8 |
3 files changed, 10 insertions, 10 deletions
diff --git a/simulation/app.go b/simulation/app.go index 9e89516..87672fd 100644 --- a/simulation/app.go +++ b/simulation/app.go @@ -195,6 +195,6 @@ func (a *simApp) DeliverBlock(blockHash common.Hash, timestamp time.Time) { a.netModule.report(msg) } -// NotaryAckDeliver is called when a notary ack is created. -func (a *simApp) NotaryAckDeliver(notaryAck *types.NotaryAck) { +// WitnessAckDeliver is called when a witness ack is created. +func (a *simApp) WitnessAckDeliver(witnessAck *types.WitnessAck) { } diff --git a/simulation/marshaller.go b/simulation/marshaller.go index ad16419..45a186d 100644 --- a/simulation/marshaller.go +++ b/simulation/marshaller.go @@ -57,8 +57,8 @@ func (m *jsonMarshaller) Unmarshal( break } msg = block - case "notary-ack": - nAck := &types.NotaryAck{} + case "witness-ack": + nAck := &types.WitnessAck{} if err = json.Unmarshal(payload, nAck); err != nil { break } @@ -109,8 +109,8 @@ func (m *jsonMarshaller) Marshal(msg interface{}) ( msgType = "info-status" case *types.Block: msgType = "block" - case *types.NotaryAck: - msgType = "notary-ack" + case *types.WitnessAck: + msgType = "witness-ack" case *types.Vote: msgType = "vote" case *types.DKGPrivateShare: diff --git a/simulation/network.go b/simulation/network.go index 83c4daf..ce6ea65 100644 --- a/simulation/network.go +++ b/simulation/network.go @@ -131,9 +131,9 @@ func (n *network) BroadcastBlock(block *types.Block) { } } -// BroadcastNotaryAck implements core.Network interface. -func (n *network) BroadcastNotaryAck(notaryAck *types.NotaryAck) { - if err := n.trans.Broadcast(notaryAck); err != nil { +// BroadcastWitnessAck implements core.Network interface. +func (n *network) BroadcastWitnessAck(witnessAck *types.WitnessAck) { + if err := n.trans.Broadcast(witnessAck); err != nil { panic(err) } } @@ -188,7 +188,7 @@ func (n *network) run() { // to consensus or validator, that's the question. disp := func(e *test.TransportEnvelope) { switch e.Msg.(type) { - case *types.Block, *types.Vote, *types.NotaryAck, + case *types.Block, *types.Vote, *types.WitnessAck, *types.DKGPrivateShare, *types.DKGPartialSignature: n.toConsensus <- e.Msg default: |