aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2017-05-25 22:21:20 +0800
committerPéter Szilágyi <peterke@gmail.com>2017-05-25 22:22:45 +0800
commitc98bce709c392f3b469f956b5f66f095a30a7e2b (patch)
tree6abc554b343b8f68e76b7303e652f22f89e47d5e /core
parent17f0b1194232ebebc4e14f905e6e1d2d148aa5b6 (diff)
downloadgo-tangerine-c98bce709c392f3b469f956b5f66f095a30a7e2b.tar
go-tangerine-c98bce709c392f3b469f956b5f66f095a30a7e2b.tar.gz
go-tangerine-c98bce709c392f3b469f956b5f66f095a30a7e2b.tar.bz2
go-tangerine-c98bce709c392f3b469f956b5f66f095a30a7e2b.tar.lz
go-tangerine-c98bce709c392f3b469f956b5f66f095a30a7e2b.tar.xz
go-tangerine-c98bce709c392f3b469f956b5f66f095a30a7e2b.tar.zst
go-tangerine-c98bce709c392f3b469f956b5f66f095a30a7e2b.zip
core: fix minor accidental typos and comment errors
Diffstat (limited to 'core')
-rw-r--r--core/blockchain.go10
-rw-r--r--core/tx_pool.go4
-rw-r--r--core/vm/interpreter.go2
3 files changed, 8 insertions, 8 deletions
diff --git a/core/blockchain.go b/core/blockchain.go
index 865077132..073b91bab 100644
--- a/core/blockchain.go
+++ b/core/blockchain.go
@@ -56,10 +56,10 @@ const (
blockCacheLimit = 256
maxFutureBlocks = 256
maxTimeFutureBlocks = 30
- // BlockChainVersion must be bumped when consensus algorithm is changed, this forces the upgradedb
- // command to be run (forces the blocks to be imported again using the new algorithm)
+ badBlockLimit = 10
+
+ // BlockChainVersion ensures that an incompatible database forces a resync from scratch.
BlockChainVersion = 3
- badBlockLimit = 10
)
// BlockChain represents the canonical chain given a database with a genesis
@@ -478,7 +478,7 @@ func (bc *BlockChain) insert(block *types.Block) {
}
}
-// Genesis Accessors
+// Genesis retrieves the chain's genesis block.
func (bc *BlockChain) Genesis() *types.Block {
return bc.genesisBlock
}
@@ -1169,7 +1169,7 @@ func (bc *BlockChain) reorg(oldBlock, newBlock *types.Block) error {
log.Error("Impossible reorg, please file an issue", "oldnum", oldBlock.Number(), "oldhash", oldBlock.Hash(), "newnum", newBlock.Number(), "newhash", newBlock.Hash())
}
var addedTxs types.Transactions
- // insert blocks. Order does not matter. Last block will be written in ImportChain itbc which creates the new head properly
+ // insert blocks. Order does not matter. Last block will be written in ImportChain itself which creates the new head properly
for _, block := range newChain {
// insert the block in the canonical way, re-writing history
bc.insert(block)
diff --git a/core/tx_pool.go b/core/tx_pool.go
index 228563ed0..6f67aaa0a 100644
--- a/core/tx_pool.go
+++ b/core/tx_pool.go
@@ -209,7 +209,7 @@ func (pool *TxPool) resetState() {
pool.promoteExecutables(currentState)
}
-// Stop stops a TxPool
+// Stop terminates the transaction pool.
func (pool *TxPool) Stop() {
pool.events.Unsubscribe()
close(pool.quit)
@@ -239,7 +239,7 @@ func (pool *TxPool) SetGasPrice(price *big.Int) {
log.Info("Transaction pool price threshold updated", "price", price)
}
-// State returns the state of TxPool
+// State returns the virtual managed state of the transaction pool.
func (pool *TxPool) State() *state.ManagedState {
pool.mu.RLock()
defer pool.mu.RUnlock()
diff --git a/core/vm/interpreter.go b/core/vm/interpreter.go
index 17edc9e33..545f7d650 100644
--- a/core/vm/interpreter.go
+++ b/core/vm/interpreter.go
@@ -91,7 +91,7 @@ func (in *Interpreter) enforceRestrictions(op OpCode, operation operation, stack
}
// Run loops and evaluates the contract's code with the given input data and returns
-// the return byte-slice and an error if one occured.
+// the return byte-slice and an error if one occurred.
//
// It's important to note that any errors returned by the interpreter should be
// considered a revert-and-consume-all-gas operation. No error specific checks