aboutsummaryrefslogtreecommitdiffstats
path: root/core/agreement.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2019-02-15 14:18:59 +0800
committerJimmy Hu <jimmy.hu@dexon.org>2019-02-19 10:48:50 +0800
commit4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c (patch)
tree625b7d34aa700d072ffb8e68dc89ed3936b76d29 /core/agreement.go
parente4825619fb2499f5f534537c1a4d52d3e0bcacfe (diff)
downloaddexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.tar
dexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.tar.gz
dexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.tar.bz2
dexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.tar.lz
dexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.tar.xz
dexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.tar.zst
dexon-consensus-4dbdc22e355cf1f6f0c39af1b2f3737b7527bc0c.zip
big-bang: single chain (#446)
Diffstat (limited to 'core/agreement.go')
-rw-r--r--core/agreement.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/core/agreement.go b/core/agreement.go
index b35100b..579cea8 100644
--- a/core/agreement.go
+++ b/core/agreement.go
@@ -162,7 +162,7 @@ func (a *agreement) restart(
defer a.lock.Unlock()
if !isStop(aID) {
oldAID := a.agreementID()
- if !isStop(oldAID) && !aID.Newer(&oldAID) {
+ if !isStop(oldAID) && !aID.Newer(oldAID) {
return false
}
}
@@ -209,7 +209,7 @@ func (a *agreement) restart(
defer a.lock.Unlock()
newPendingBlock := make([]pendingBlock, 0)
for _, pending := range a.pendingBlock {
- if aID.Newer(&pending.block.Position) {
+ if aID.Newer(pending.block.Position) {
continue
} else if pending.block.Position == aID {
replayBlock = append(replayBlock, pending.block)
@@ -226,7 +226,7 @@ func (a *agreement) restart(
defer a.lock.Unlock()
newPendingVote := make([]pendingVote, 0)
for _, pending := range a.pendingVote {
- if aID.Newer(&pending.vote.Position) {
+ if aID.Newer(pending.vote.Position) {
continue
} else if pending.vote.Position == aID {
replayVote = append(replayVote, pending.vote)
@@ -390,7 +390,7 @@ func (a *agreement) processVote(vote *types.Vote) error {
return nil
}
if vote.Position != aID {
- if aID.Newer(&vote.Position) {
+ if aID.Newer(vote.Position) {
return nil
}
a.pendingVote = append(a.pendingVote, pendingVote{
@@ -547,7 +547,7 @@ func (a *agreement) processBlock(block *types.Block) error {
if block.Position != aID {
// Agreement module has stopped.
if !isStop(aID) {
- if aID.Newer(&block.Position) {
+ if aID.Newer(block.Position) {
return nil
}
}