aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--dex/consensus/core/agreement-mgr.go2
-rw-r--r--dex/consensus/core/agreement.go2
-rw-r--r--dex/consensus/core/consensus.go2
-rw-r--r--dex/consensus/core/db/memory.go2
-rw-r--r--dex/consensus/core/syncer/watch-cat.go2
-rw-r--r--dex/consensus/core/test/governance.go2
-rw-r--r--dex/consensus/core/test/marshaller.go2
-rw-r--r--dex/consensus/integration_test/byzantine_test.go4
8 files changed, 9 insertions, 9 deletions
diff --git a/dex/consensus/core/agreement-mgr.go b/dex/consensus/core/agreement-mgr.go
index d84aaf51c..b951dd3f8 100644
--- a/dex/consensus/core/agreement-mgr.go
+++ b/dex/consensus/core/agreement-mgr.go
@@ -466,7 +466,7 @@ func (mgr *agreementMgr) runBA(initRound uint64) {
currentRound = nextRound
nextRound++
}()
- // Wait until the configuartion for next round is ready.
+ // Wait until the configuration for next round is ready.
for {
if setting = mgr.generateSetting(nextRound); setting != nil {
break
diff --git a/dex/consensus/core/agreement.go b/dex/consensus/core/agreement.go
index 2497f1611..dd7928ac0 100644
--- a/dex/consensus/core/agreement.go
+++ b/dex/consensus/core/agreement.go
@@ -115,7 +115,7 @@ type agreementData struct {
blocksLock sync.Mutex
}
-// agreement is the agreement protocal describe in the Crypto Shuffle Algorithm.
+// agreement is the agreement protocol describe in the Crypto Shuffle Algorithm.
type agreement struct {
state agreementState
data *agreementData
diff --git a/dex/consensus/core/consensus.go b/dex/consensus/core/consensus.go
index 310530830..ed5989833 100644
--- a/dex/consensus/core/consensus.go
+++ b/dex/consensus/core/consensus.go
@@ -356,7 +356,7 @@ func (recv *consensusBAReceiver) ConfirmBlock(
"parent-hash", block.ParentHash.String()[:6],
"cur-position", block.Position)
if !block.IsFinalized() {
- // TODO(jimmy): use a seperate message to pull finalized
+ // TODO(jimmy): use a separate message to pull finalized
// block. Here, we pull it again as workaround.
continue
}
diff --git a/dex/consensus/core/db/memory.go b/dex/consensus/core/db/memory.go
index 97de9df41..3d253aace 100644
--- a/dex/consensus/core/db/memory.go
+++ b/dex/consensus/core/db/memory.go
@@ -94,7 +94,7 @@ func NewMemBackedDB(persistantFilePath ...string) (
return
}
-// HasBlock returns wheter or not the DB has a block identified with the hash.
+// HasBlock returns whether or not the DB has a block identified with the hash.
func (m *MemBackedDB) HasBlock(hash common.Hash) bool {
m.blocksLock.RLock()
defer m.blocksLock.RUnlock()
diff --git a/dex/consensus/core/syncer/watch-cat.go b/dex/consensus/core/syncer/watch-cat.go
index c93137706..c338a0ea8 100644
--- a/dex/consensus/core/syncer/watch-cat.go
+++ b/dex/consensus/core/syncer/watch-cat.go
@@ -31,7 +31,7 @@ type configReader interface {
Configuration(round uint64) *types.Config
}
-// WatchCat is reponsible for signaling if syncer object should be terminated.
+// WatchCat is responsible for signaling if syncer object should be terminated.
type WatchCat struct {
recovery core.Recovery
timeout time.Duration
diff --git a/dex/consensus/core/test/governance.go b/dex/consensus/core/test/governance.go
index f22876945..5aeff26f0 100644
--- a/dex/consensus/core/test/governance.go
+++ b/dex/consensus/core/test/governance.go
@@ -35,7 +35,7 @@ import (
// TODO(mission): add a method to compare config/crs between governance
// instances.
-// Governance is an implementation of Goverance for testing purpose.
+// Governance is an implementation of Governance for testing purpose.
type Governance struct {
roundShift uint64
configs []*types.Config
diff --git a/dex/consensus/core/test/marshaller.go b/dex/consensus/core/test/marshaller.go
index da8a0ffc1..e81d05484 100644
--- a/dex/consensus/core/test/marshaller.go
+++ b/dex/consensus/core/test/marshaller.go
@@ -152,7 +152,7 @@ func (m *DefaultMarshaller) Marshal(
payload, err = json.Marshal(msg)
default:
if m.fallback == nil {
- err = fmt.Errorf("unknwon message type: %v", msg)
+ err = fmt.Errorf("unknown message type: %v", msg)
break
}
msgType, payload, err = m.fallback.Marshal(msg)
diff --git a/dex/consensus/integration_test/byzantine_test.go b/dex/consensus/integration_test/byzantine_test.go
index cf8449ad3..761cc75a8 100644
--- a/dex/consensus/integration_test/byzantine_test.go
+++ b/dex/consensus/integration_test/byzantine_test.go
@@ -213,7 +213,7 @@ func (s *ByzantineTestSuite) TestOneNodeWithoutVote() {
peerCount = 4
dMoment = time.Now().UTC()
untilRound = uint64(3)
- tolerence = uint64(2)
+ tolerance = uint64(2)
)
if testing.Short() {
untilRound = 2
@@ -252,7 +252,7 @@ Loop:
if otherPos.Newer(latestPos) {
fmt.Println("otherPos", n.ID, &otherPos)
s.Require().True(
- otherPos.Height-latestPos.Height <= tolerence)
+ otherPos.Height-latestPos.Height <= tolerance)
}
}
if latestPos.Round < untilRound {