aboutsummaryrefslogtreecommitdiffstats
path: root/core/consensus.go
diff options
context:
space:
mode:
Diffstat (limited to 'core/consensus.go')
-rw-r--r--core/consensus.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/core/consensus.go b/core/consensus.go
index 6a97e9e..33f2f8b 100644
--- a/core/consensus.go
+++ b/core/consensus.go
@@ -22,6 +22,7 @@ import (
"time"
"github.com/dexon-foundation/dexon-consensus-core/blockdb"
+ "github.com/dexon-foundation/dexon-consensus-core/common"
"github.com/dexon-foundation/dexon-consensus-core/core/types"
)
@@ -101,8 +102,11 @@ func (con *Consensus) ProcessBlock(b *types.Block) (err error) {
}
}
// TODO(mission): handle membership events here.
- // TODO(mission): return block hash instead of whole block here.
- con.app.TotalOrderingDeliver(deliveredBlocks, earlyDelivered)
+ hashes := make(common.Hashes, len(deliveredBlocks))
+ for idx := range deliveredBlocks {
+ hashes[idx] = deliveredBlocks[idx].Hash
+ }
+ con.app.TotalOrderingDeliver(hashes, earlyDelivered)
// Perform timestamp generation.
deliveredBlocks, _, err = con.ctModule.processBlocks(
deliveredBlocks)