diff --git a/XDCx/tradingstate/state_liquidationprice.go b/XDCx/tradingstate/state_liquidationprice.go index cb0b872112..062dd36b7e 100644 --- a/XDCx/tradingstate/state_liquidationprice.go +++ b/XDCx/tradingstate/state_liquidationprice.go @@ -166,7 +166,7 @@ func (l *liquidationPriceState) deepCopy(db *TradingStateDB, onDirty func(liquid return stateOrderList } -// Retrieve a state object given my the address. Returns nil if not found. +// Retrieve a state object given by the address. Returns nil if not found. func (l *liquidationPriceState) getStateLendingBook(db Database, lendingBook common.Hash) (stateObject *stateLendingBook) { // Prefer 'live' objects. if obj := l.stateLendingBooks[lendingBook]; obj != nil { diff --git a/XDCx/tradingstate/state_orderbook.go b/XDCx/tradingstate/state_orderbook.go index a5832543cf..5ed8ffddc8 100644 --- a/XDCx/tradingstate/state_orderbook.go +++ b/XDCx/tradingstate/state_orderbook.go @@ -227,7 +227,7 @@ func (te *tradingExchanges) updateAsksTrie(db Database) Trie { return tr } -// CommitAskTrie the storage trie of the object to dwb. +// CommitAskTrie the storage trie of the object to db. // This updates the trie root. func (te *tradingExchanges) updateAsksRoot(db Database) error { te.updateAsksTrie(db) @@ -238,7 +238,7 @@ func (te *tradingExchanges) updateAsksRoot(db Database) error { return nil } -// CommitAskTrie the storage trie of the object to dwb. +// CommitAskTrie the storage trie of the object to db. // This updates the trie root. func (te *tradingExchanges) CommitAsksTrie(db Database) error { te.updateAsksTrie(db) @@ -300,7 +300,7 @@ func (te *tradingExchanges) updateBidsRoot(db Database) { te.data.BidRoot = te.bidsTrie.Hash() } -// CommitAskTrie the storage trie of the object to dwb. +// CommitAskTrie the storage trie of the object to db. // This updates the trie root. func (te *tradingExchanges) CommitBidsTrie(db Database) error { te.updateBidsTrie(db) @@ -417,7 +417,7 @@ func (te *tradingExchanges) removeStateOrderListBidObject(db Database, stateOrde te.setError(te.bidsTrie.TryDelete(stateOrderList.price[:])) } -// Retrieve a state object given my the address. Returns nil if not found. +// Retrieve a state object given by the address. Returns nil if not found. func (te *tradingExchanges) getStateOrderListAskObject(db Database, price common.Hash) (stateOrderList *stateOrderList) { // Prefer 'live' objects. if obj := te.stateAskObjects[price]; obj != nil { @@ -469,7 +469,7 @@ func (te *tradingExchanges) createStateOrderListAskObject(db Database, price com return newobj } -// Retrieve a state object given my the address. Returns nil if not found. +// Retrieve a state object given by the address. Returns nil if not found. func (te *tradingExchanges) getStateBidOrderListObject(db Database, price common.Hash) (stateOrderList *stateOrderList) { // Prefer 'live' objects. if obj := te.stateBidObjects[price]; obj != nil { @@ -521,7 +521,7 @@ func (te *tradingExchanges) createStateBidOrderListObject(db Database, price com return newobj } -// Retrieve a state object given my the address. Returns nil if not found. +// Retrieve a state object given by the address. Returns nil if not found. func (te *tradingExchanges) getStateOrderObject(db Database, orderId common.Hash) (stateOrderItem *stateOrderItem) { // Prefer 'live' objects. if obj := te.stateOrderObjects[orderId]; obj != nil { @@ -587,14 +587,14 @@ func (t *tradingExchanges) updateOrdersTrie(db Database) Trie { return tr } -// CommitAskTrie the storage trie of the object to dwb. +// CommitAskTrie the storage trie of the object to db. // This updates the trie root. func (t *tradingExchanges) updateOrdersRoot(db Database) { t.updateOrdersTrie(db) t.data.OrderRoot = t.ordersTrie.Hash() } -// CommitAskTrie the storage trie of the object to dwb. +// CommitAskTrie the storage trie of the object to db. // This updates the trie root. func (t *tradingExchanges) CommitOrdersTrie(db Database) error { t.updateOrdersTrie(db) diff --git a/XDCx/tradingstate/statedb.go b/XDCx/tradingstate/statedb.go index 73de7f7e77..ad02e76015 100644 --- a/XDCx/tradingstate/statedb.go +++ b/XDCx/tradingstate/statedb.go @@ -424,7 +424,7 @@ func (t *TradingStateDB) updateStateExchangeObject(stateObject *tradingExchanges t.setError(t.trie.TryUpdate(addr[:], data)) } -// Retrieve a state object given my the address. Returns nil if not found. +// Retrieve a state object given by the address. Returns nil if not found. func (t *TradingStateDB) getStateExchangeObject(addr common.Hash) (stateObject *tradingExchanges) { // Prefer 'live' objects. if obj := t.stateExhangeObjects[addr]; obj != nil { diff --git a/XDCxlending/lendingstate/statedb.go b/XDCxlending/lendingstate/statedb.go index b28de7c3ed..b74342d596 100644 --- a/XDCxlending/lendingstate/statedb.go +++ b/XDCxlending/lendingstate/statedb.go @@ -409,7 +409,7 @@ func (ls *LendingStateDB) updateLendingExchange(stateObject *lendingExchangeStat ls.setError(ls.trie.TryUpdate(addr[:], data)) } -// Retrieve a state object given my the address. Returns nil if not found. +// Retrieve a state object given by the address. Returns nil if not found. func (ls *LendingStateDB) getLendingExchange(addr common.Hash) (stateObject *lendingExchangeState) { // Prefer 'live' objects. if obj := ls.lendingExchangeStates[addr]; obj != nil { diff --git a/consensus/XDPoS/engines/engine_v1/engine.go b/consensus/XDPoS/engines/engine_v1/engine.go index 734e336e2f..da8188e377 100644 --- a/consensus/XDPoS/engines/engine_v1/engine.go +++ b/consensus/XDPoS/engines/engine_v1/engine.go @@ -482,7 +482,7 @@ func (x *XDPoS_v1) snapshot(chain consensus.ChainReader, number uint64, hash com // checkpoint snapshot = checkpoint - gap if (number+x.config.Gap)%x.config.Epoch == 0 { if s, err := loadSnapshot(x.config, x.signatures, x.db, hash); err == nil { - log.Trace("Loaded voting snapshot form disk", "number", number, "hash", hash) + log.Trace("Loaded voting snapshot from disk", "number", number, "hash", hash) snap = s break } diff --git a/consensus/clique/clique.go b/consensus/clique/clique.go index c69ada37d1..6187028711 100644 --- a/consensus/clique/clique.go +++ b/consensus/clique/clique.go @@ -397,7 +397,7 @@ func (c *Clique) snapshot(chain consensus.ChainReader, number uint64, hash commo // If an on-disk checkpoint snapshot can be found, use that if number%checkpointInterval == 0 { if s, err := loadSnapshot(c.config, c.signatures, c.db, hash); err == nil { - log.Trace("Loaded voting snapshot form disk", "number", number, "hash", hash) + log.Trace("Loaded voting snapshot from disk", "number", number, "hash", hash) snap = s break } diff --git a/core/state/state_object.go b/core/state/state_object.go index 700ef6cef8..b3c37f6541 100644 --- a/core/state/state_object.go +++ b/core/state/state_object.go @@ -319,7 +319,7 @@ func (s *stateObject) updateRoot(db Database) { s.data.Root = s.trie.Hash() } -// CommitTrie the storage trie of the object to dwb. +// CommitTrie the storage trie of the object to db. // This updates the trie root. func (s *stateObject) CommitTrie(db Database) error { // If nothing changed, don't bother with hashing anything