diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-08-10 13:40:57 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-10 13:40:57 +0800 |
commit | b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538 (patch) | |
tree | 9595ccf912234c24674138705d2cc2b463212905 /core/test | |
parent | 99d9591e5f0af54bf06f41cfd2658cfcc9ee6436 (diff) | |
download | dexon-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar dexon-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.gz dexon-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.bz2 dexon-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.lz dexon-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.xz dexon-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.tar.zst dexon-consensus-b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538.zip |
core: Deliver only Hash to Application. (#43)
Diffstat (limited to 'core/test')
-rw-r--r-- | core/test/app.go | 9 |
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, }) } |