Skip to content

Commit c98bce7

Browse files
committed
core: fix minor accidental typos and comment errors
1 parent 17f0b11 commit c98bce7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

core/blockchain.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@ const (
5656
blockCacheLimit = 256
5757
maxFutureBlocks = 256
5858
maxTimeFutureBlocks = 30
59-
// BlockChainVersion must be bumped when consensus algorithm is changed, this forces the upgradedb
60-
// command to be run (forces the blocks to be imported again using the new algorithm)
59+
badBlockLimit = 10
60+
61+
// BlockChainVersion ensures that an incompatible database forces a resync from scratch.
6162
BlockChainVersion = 3
62-
badBlockLimit = 10
6363
)
6464

6565
// BlockChain represents the canonical chain given a database with a genesis
@@ -478,7 +478,7 @@ func (bc *BlockChain) insert(block *types.Block) {
478478
}
479479
}
480480

481-
// Genesis Accessors
481+
// Genesis retrieves the chain's genesis block.
482482
func (bc *BlockChain) Genesis() *types.Block {
483483
return bc.genesisBlock
484484
}
@@ -1169,7 +1169,7 @@ func (bc *BlockChain) reorg(oldBlock, newBlock *types.Block) error {
11691169
log.Error("Impossible reorg, please file an issue", "oldnum", oldBlock.Number(), "oldhash", oldBlock.Hash(), "newnum", newBlock.Number(), "newhash", newBlock.Hash())
11701170
}
11711171
var addedTxs types.Transactions
1172-
// insert blocks. Order does not matter. Last block will be written in ImportChain itbc which creates the new head properly
1172+
// insert blocks. Order does not matter. Last block will be written in ImportChain itself which creates the new head properly
11731173
for _, block := range newChain {
11741174
// insert the block in the canonical way, re-writing history
11751175
bc.insert(block)

core/tx_pool.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ func (pool *TxPool) resetState() {
209209
pool.promoteExecutables(currentState)
210210
}
211211

212-
// Stop stops a TxPool
212+
// Stop terminates the transaction pool.
213213
func (pool *TxPool) Stop() {
214214
pool.events.Unsubscribe()
215215
close(pool.quit)
@@ -239,7 +239,7 @@ func (pool *TxPool) SetGasPrice(price *big.Int) {
239239
log.Info("Transaction pool price threshold updated", "price", price)
240240
}
241241

242-
// State returns the state of TxPool
242+
// State returns the virtual managed state of the transaction pool.
243243
func (pool *TxPool) State() *state.ManagedState {
244244
pool.mu.RLock()
245245
defer pool.mu.RUnlock()

core/vm/interpreter.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ func (in *Interpreter) enforceRestrictions(op OpCode, operation operation, stack
9191
}
9292

9393
// Run loops and evaluates the contract's code with the given input data and returns
94-
// the return byte-slice and an error if one occured.
94+
// the return byte-slice and an error if one occurred.
9595
//
9696
// It's important to note that any errors returned by the interpreter should be
9797
// considered a revert-and-consume-all-gas operation. No error specific checks

0 commit comments

Comments
 (0)