aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/app.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-08-10 13:40:57 +0800
committerGitHub <noreply@github.com>2018-08-10 13:40:57 +0800
commitb88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538 (patch)
tree9595ccf912234c24674138705d2cc2b463212905 /core/test/app.go
parent99d9591e5f0af54bf06f41cfd2658cfcc9ee6436 (diff)
downloadtangerine-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar
tangerine-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.gz
tangerine-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.bz2
tangerine-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.lz
tangerine-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.xz
tangerine-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.zst
tangerine-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.zip
core: Deliver only Hash to Application. (#43)
Diffstat (limited to 'core/test/app.go')
-rw-r--r--core/test/app.go9
1 files changed, 2 insertions, 7 deletions
diff --git a/core/test/app.go b/core/test/app.go
index f596afb..55ba7c5 100644
--- a/core/test/app.go
+++ b/core/test/app.go
@@ -21,7 +21,6 @@ import (
"time"
"github.com/dexon-foundation/dexon-consensus-core/common"
- "github.com/dexon-foundation/dexon-consensus-core/core/types"
)
// App implements Application interface for testing purpose.
@@ -52,16 +51,12 @@ func (app *App) StronglyAcked(blockHash common.Hash) {
}
// TotalOrderingDeliver implements Application interface.
-func (app *App) TotalOrderingDeliver(blocks []*types.Block, early bool) {
- var hashes common.Hashes
- for _, b := range blocks {
- hashes = append(hashes, b.Hash)
- }
+func (app *App) TotalOrderingDeliver(blockHashes common.Hashes, early bool) {
app.TotalOrdered = append(app.TotalOrdered, &struct {
BlockHashes common.Hashes
Early bool
}{
- BlockHashes: hashes,
+ BlockHashes: blockHashes,
Early: early,
})
}