aboutsummaryrefslogtreecommitdiffstats
path: root/core/blockdb
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/blockdb
parent37f117d35c6617e1944d45e001e03813a6a278ed (diff)
downloaddexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.gz
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.bz2
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.lz
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.xz
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.tar.zst
dexon-consensus-421d72b2d796195178104a0eb1dedf319ba8664c.zip
Rename validator* to node* (#120)
Diffstat (limited to 'core/blockdb')
-rw-r--r--core/blockdb/level-db_test.go8
-rw-r--r--core/blockdb/memory_test.go4
2 files changed, 6 insertions, 6 deletions
diff --git a/core/blockdb/level-db_test.go b/core/blockdb/level-db_test.go
index 06829f0..9cabc4a 100644
--- a/core/blockdb/level-db_test.go
+++ b/core/blockdb/level-db_test.go
@@ -51,9 +51,9 @@ func (s *LevelDBTestSuite) TestBasicUsage() {
s.Equal(ErrBlockDoesNotExist, err)
// Update on an empty database should not success.
- validator1 := types.ValidatorID{Hash: common.NewRandomHash()}
+ node1 := types.NodeID{Hash: common.NewRandomHash()}
block1 := types.Block{
- ProposerID: validator1,
+ ProposerID: node1,
Hash: hash1,
Position: types.Position{
Height: 1,
@@ -78,7 +78,7 @@ func (s *LevelDBTestSuite) TestBasicUsage() {
err = db.Update(queried)
s.Nil(err)
- // Try to get it back via ValidatorID and height.
+ // Try to get it back via NodeID and height.
queried, err = db.Get(block1.Hash)
s.Nil(err)
@@ -100,7 +100,7 @@ func (s *LevelDBTestSuite) TestSyncIndex() {
blocks := [10]types.Block{}
for i := range blocks {
block := types.Block{
- ProposerID: types.ValidatorID{Hash: common.NewRandomHash()},
+ ProposerID: types.NodeID{Hash: common.NewRandomHash()},
Hash: common.NewRandomHash(),
Position: types.Position{
Height: uint64(i),
diff --git a/core/blockdb/memory_test.go b/core/blockdb/memory_test.go
index 9a3cfa2..a77d355 100644
--- a/core/blockdb/memory_test.go
+++ b/core/blockdb/memory_test.go
@@ -29,12 +29,12 @@ import (
type MemBackedBlockDBTestSuite struct {
suite.Suite
- v0 types.ValidatorID
+ v0 types.NodeID
b00, b01, b02 *types.Block
}
func (s *MemBackedBlockDBTestSuite) SetupSuite() {
- s.v0 = types.ValidatorID{Hash: common.NewRandomHash()}
+ s.v0 = types.NodeID{Hash: common.NewRandomHash()}
genesisHash := common.NewRandomHash()
s.b00 = &types.Block{