aboutsummaryrefslogtreecommitdiffstats
path: root/blockdb
diff options
context:
space:
mode:
authorHaoping Ku <haoping.ku@dexon.org>2018-07-30 11:40:16 +0800
committerWei-Ning Huang <aitjcize@gmail.com>2018-07-30 11:40:16 +0800
commitaaeaebaf5dec3a9a17d0a626cb19e76834f9e4cb (patch)
tree1682bfaa9abca34ef51e57ac527f5b28eb504106 /blockdb
parent279daea6e004ab6ad9d079ccc35b7c52d79630ad (diff)
downloaddexon-consensus-aaeaebaf5dec3a9a17d0a626cb19e76834f9e4cb.tar
dexon-consensus-aaeaebaf5dec3a9a17d0a626cb19e76834f9e4cb.tar.gz
dexon-consensus-aaeaebaf5dec3a9a17d0a626cb19e76834f9e4cb.tar.bz2
dexon-consensus-aaeaebaf5dec3a9a17d0a626cb19e76834f9e4cb.tar.lz
dexon-consensus-aaeaebaf5dec3a9a17d0a626cb19e76834f9e4cb.tar.xz
dexon-consensus-aaeaebaf5dec3a9a17d0a626cb19e76834f9e4cb.tar.zst
dexon-consensus-aaeaebaf5dec3a9a17d0a626cb19e76834f9e4cb.zip
Add acking module (#13)
* Refactor and add acking module Extract acking module for unit testing. This commit splits functions into small pieces for better understanding and easy unit testing.
Diffstat (limited to 'blockdb')
-rw-r--r--blockdb/level-db_test.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/blockdb/level-db_test.go b/blockdb/level-db_test.go
index 13a934d..ef698f6 100644
--- a/blockdb/level-db_test.go
+++ b/blockdb/level-db_test.go
@@ -56,7 +56,7 @@ func (s *LevelDBTestSuite) TestBasicUsage() {
ProposerID: validator1,
Hash: hash1,
Height: 1,
- State: types.BlockStatusInit,
+ Status: types.BlockStatusInit,
}
err = db.Update(block1)
s.Equal(ErrBlockDoesNotExist, err)
@@ -69,7 +69,7 @@ func (s *LevelDBTestSuite) TestBasicUsage() {
queried, err := db.Get(block1.Hash)
s.Nil(err)
s.Equal(queried.ProposerID, block1.ProposerID)
- s.Equal(queried.State, block1.State)
+ s.Equal(queried.Status, block1.Status)
// Test Update.
now := time.Now().UTC()
@@ -105,7 +105,7 @@ func (s *LevelDBTestSuite) TestSyncIndex() {
ProposerID: types.ValidatorID{Hash: common.NewRandomHash()},
Hash: common.NewRandomHash(),
Height: uint64(i),
- State: types.BlockStatusInit,
+ Status: types.BlockStatusInit,
}
db.Put(block)
blocks[i] = block