aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/interface.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-09-20 09:09:37 +0800
committerGitHub <noreply@github.com>2018-09-20 09:09:37 +0800
commit421d72b2d796195178104a0eb1dedf319ba8664c (patch)
treef32f15c167989905494eca1891c3240b80dac1d6 /core/test/interface.go
parent37f117d35c6617e1944d45e001e03813a6a278ed (diff)
downloadtangerine-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar
tangerine-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.gz
tangerine-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.bz2
tangerine-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.lz
tangerine-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.xz
tangerine-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.zst
tangerine-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.zip
Rename validator* to node* (#120)
Diffstat (limited to 'core/test/interface.go')
-rw-r--r--core/test/interface.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/test/interface.go b/core/test/interface.go
index 0dc2382..a422ee7 100644
--- a/core/test/interface.go
+++ b/core/test/interface.go
@@ -38,7 +38,7 @@ type Stopper interface {
// moment.
// The Stopper should check state of that handler and return 'true'
// if the execution could be stopped.
- ShouldStop(vID types.ValidatorID) bool
+ ShouldStop(nID types.NodeID) bool
}
// EventHandler defines an interface to handle a Scheduler event.
@@ -62,8 +62,8 @@ type TransportEnvelope struct {
// PeerType defines the type of source peer, could be either "peer" or
// "server".
PeerType TransportPeerType
- // From defines the validatorID of the source peer.
- From types.ValidatorID
+ // From defines the nodeID of the source peer.
+ From types.NodeID
// Msg is the actual payload of this message.
Msg interface{}
}
@@ -92,14 +92,14 @@ type Transport interface {
// Broadcast a message to all peers in network.
Broadcast(msg interface{}) error
// Send one message to a peer.
- Send(endpoint types.ValidatorID, msg interface{}) error
+ Send(endpoint types.NodeID, msg interface{}) error
// Close would cleanup allocated resources.
Close() error
- // Peers return IDs of all connected validators in p2p favor.
+ // Peers return IDs of all connected nodes in p2p favor.
// This method should be accessed after ether 'Join' or 'WaitForPeers'
// returned.
- Peers() map[types.ValidatorID]struct{}
+ Peers() map[types.NodeID]struct{}
}
// Marshaller defines an interface to convert between interface{} and []byte.