From b88d8ddb0eaf48fac1fdf10dcd7db4dc896e6538 Mon Sep 17 00:00:00 2001 From: Jimmy Hu Date: Fri, 10 Aug 2018 13:40:57 +0800 Subject: core: Deliver only Hash to Application. (#43) --- core/test/app.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'core/test') 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, }) } -- cgit v1.2.3