aboutsummaryrefslogtreecommitdiffstats
path: root/core/nonblocking_test.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-02-15 14:18:59 +0800
committerJimmy Hu <jimmy.hu@dexon.org>2019-02-19 10:48:50 +0800
commit4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c (patch)
tree625b7d34aa700d072ffb8e68dc89ed3936b76d29 /core/nonblocking_test.go
parente4825619fb2499f5f534537c1a4d52d3e0bcacfe (diff)
downloaddexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.tar.gz
dexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.tar.zst
dexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.zip
big-bang: single chain (#446)
Diffstat (limited to 'core/nonblocking_test.go')
-rw-r--r--core/nonblocking_test.go23
1 files changed, 6 insertions, 17 deletions
diff --git a/core/nonblocking_test.go b/core/nonblocking_test.go
index 542382c..110433a 100644
--- a/core/nonblocking_test.go
+++ b/core/nonblocking_test.go
@@ -29,18 +29,16 @@ import (
// slowApp is an Application instance slow things down in every method.
type slowApp struct {
- sleep time.Duration
- blockConfirmed map[common.Hash]struct{}
- totalOrderingDelivered map[common.Hash]struct{}
- blockDelivered map[common.Hash]struct{}
+ sleep time.Duration
+ blockConfirmed map[common.Hash]struct{}
+ blockDelivered map[common.Hash]struct{}
}
func newSlowApp(sleep time.Duration) *slowApp {
return &slowApp{
- sleep: sleep,
- blockConfirmed: make(map[common.Hash]struct{}),
- totalOrderingDelivered: make(map[common.Hash]struct{}),
- blockDelivered: make(map[common.Hash]struct{}),
+ sleep: sleep,
+ blockConfirmed: make(map[common.Hash]struct{}),
+ blockDelivered: make(map[common.Hash]struct{}),
}
}
@@ -61,13 +59,6 @@ func (app *slowApp) BlockConfirmed(block types.Block) {
app.blockConfirmed[block.Hash] = struct{}{}
}
-func (app *slowApp) TotalOrderingDelivered(blockHashes common.Hashes, mode uint32) {
- time.Sleep(app.sleep)
- for _, hash := range blockHashes {
- app.totalOrderingDelivered[hash] = struct{}{}
- }
-}
-
func (app *slowApp) BlockDelivered(blockHash common.Hash,
blockPosition types.Position, _ types.FinalizationResult) {
time.Sleep(app.sleep)
@@ -137,7 +128,6 @@ func (s *NonBlockingTestSuite) TestNonBlocking() {
nbModule.BlockDelivered(
hash, types.Position{}, types.FinalizationResult{})
}
- nbModule.TotalOrderingDelivered(hashes, TotalOrderingModeEarly)
// nonBlocking should be non-blocking.
s.True(shouldFinish.After(time.Now().UTC()))
@@ -145,7 +135,6 @@ func (s *NonBlockingTestSuite) TestNonBlocking() {
nbModule.wait()
for _, hash := range hashes {
s.Contains(app.blockConfirmed, hash)
- s.Contains(app.totalOrderingDelivered, hash)
s.Contains(app.blockDelivered, hash)
}
}