diff options
author | Jimmy Hu <jimmy.hu@dexon.org> | 2018-09-03 10:01:40 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-03 10:01:40 +0800 |
commit | c8d3092208f73ee991a123052a71b7dbf7fffc27 (patch) | |
tree | fdcb3b90b859531e042dbbdd6bcd7b0cca40e86a /simulation | |
parent | 9491ddae81640e04f8aed38e2cddeb64cc62d55b (diff) | |
download | dexon-consensus-c8d3092208f73ee991a123052a71b7dbf7fffc27.tar dexon-consensus-c8d3092208f73ee991a123052a71b7dbf7fffc27.tar.gz dexon-consensus-c8d3092208f73ee991a123052a71b7dbf7fffc27.tar.bz2 dexon-consensus-c8d3092208f73ee991a123052a71b7dbf7fffc27.tar.lz dexon-consensus-c8d3092208f73ee991a123052a71b7dbf7fffc27.tar.xz dexon-consensus-c8d3092208f73ee991a123052a71b7dbf7fffc27.tar.zst dexon-consensus-c8d3092208f73ee991a123052a71b7dbf7fffc27.zip |
core: Add a new structure `Position` and move `ShardID`, `ChainID` and `Height` from `Block` (#89)
Diffstat (limited to 'simulation')
-rw-r--r-- | simulation/app.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/simulation/app.go b/simulation/app.go index f12290c..aded2a7 100644 --- a/simulation/app.go +++ b/simulation/app.go @@ -81,7 +81,7 @@ func (a *simApp) getAckedBlocks(ackHash common.Hash) (output common.Hashes) { return } for i, blockHash := range hashes { - if a.blockByHash[blockHash].Height > ackBlock.Height { + if a.blockByHash[blockHash].Position.Height > ackBlock.Position.Height { output, a.unconfirmedBlocks[ackBlock.ProposerID] = hashes[:i], hashes[i:] break } @@ -95,7 +95,7 @@ func (a *simApp) getAckedBlocks(ackHash common.Hash) (output common.Hashes) { } // PreparePayloads implements core.Application. -func (a *simApp) PreparePayloads(shardID, chainID, height uint64) [][]byte { +func (a *simApp) PreparePayloads(position types.Position) [][]byte { return [][]byte{} } |