diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-10-11 19:33:25 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-11 19:33:25 +0800 |
commit | 490fa1e9ce2b661e4c8b612bd53f20123346353b (patch) | |
tree | 2ef4a4fabb1e21d46ef3e47538dadfeecdf2cf4d /core/compaction-chain_test.go | |
parent | f3e9eb613c7e8dec6b8c6b1b0a20ddbec4e91a9c (diff) | |
download | dexon-consensus-490fa1e9ce2b661e4c8b612bd53f20123346353b.tar dexon-consensus-490fa1e9ce2b661e4c8b612bd53f20123346353b.tar.gz dexon-consensus-490fa1e9ce2b661e4c8b612bd53f20123346353b.tar.bz2 dexon-consensus-490fa1e9ce2b661e4c8b612bd53f20123346353b.tar.lz dexon-consensus-490fa1e9ce2b661e4c8b612bd53f20123346353b.tar.xz dexon-consensus-490fa1e9ce2b661e4c8b612bd53f20123346353b.tar.zst dexon-consensus-490fa1e9ce2b661e4c8b612bd53f20123346353b.zip |
core: change interface (#193)
* Extract types.FinalizationResult
* Change interface:
- Application.BlockConfirmed returns whole block.
- Application.BlockDelivered returns partial result.
Diffstat (limited to 'core/compaction-chain_test.go')
-rw-r--r-- | core/compaction-chain_test.go | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/core/compaction-chain_test.go b/core/compaction-chain_test.go index 5ceb5c2..3366d5f 100644 --- a/core/compaction-chain_test.go +++ b/core/compaction-chain_test.go @@ -43,8 +43,10 @@ func (s *CompactionChainTestSuite) generateBlocks( blocks := make([]*types.Block, size) for idx := range blocks { blocks[idx] = &types.Block{ - Hash: common.NewRandomHash(), - ConsensusTimestamp: now, + Hash: common.NewRandomHash(), + Finalization: types.FinalizationResult{ + Timestamp: now, + }, } now = now.Add(100 * time.Millisecond) } @@ -61,8 +63,10 @@ func (s *CompactionChainTestSuite) TestProcessBlock() { blocks := make([]*types.Block, 10) for idx := range blocks { blocks[idx] = &types.Block{ - Hash: common.NewRandomHash(), - ConsensusTimestamp: now, + Hash: common.NewRandomHash(), + Finalization: types.FinalizationResult{ + Timestamp: now, + }, } now = now.Add(100 * time.Millisecond) } |