forked from cerc-io/plugeth
core: fix minor accidental typos and comment errors
This commit is contained in:
parent
17f0b11942
commit
c98bce709c
@ -56,10 +56,10 @@ const (
|
|||||||
blockCacheLimit = 256
|
blockCacheLimit = 256
|
||||||
maxFutureBlocks = 256
|
maxFutureBlocks = 256
|
||||||
maxTimeFutureBlocks = 30
|
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)
|
|
||||||
BlockChainVersion = 3
|
|
||||||
badBlockLimit = 10
|
badBlockLimit = 10
|
||||||
|
|
||||||
|
// BlockChainVersion ensures that an incompatible database forces a resync from scratch.
|
||||||
|
BlockChainVersion = 3
|
||||||
)
|
)
|
||||||
|
|
||||||
// BlockChain represents the canonical chain given a database with a genesis
|
// 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 {
|
func (bc *BlockChain) Genesis() *types.Block {
|
||||||
return bc.genesisBlock
|
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())
|
log.Error("Impossible reorg, please file an issue", "oldnum", oldBlock.Number(), "oldhash", oldBlock.Hash(), "newnum", newBlock.Number(), "newhash", newBlock.Hash())
|
||||||
}
|
}
|
||||||
var addedTxs types.Transactions
|
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 {
|
for _, block := range newChain {
|
||||||
// insert the block in the canonical way, re-writing history
|
// insert the block in the canonical way, re-writing history
|
||||||
bc.insert(block)
|
bc.insert(block)
|
||||||
|
@ -209,7 +209,7 @@ func (pool *TxPool) resetState() {
|
|||||||
pool.promoteExecutables(currentState)
|
pool.promoteExecutables(currentState)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stop stops a TxPool
|
// Stop terminates the transaction pool.
|
||||||
func (pool *TxPool) Stop() {
|
func (pool *TxPool) Stop() {
|
||||||
pool.events.Unsubscribe()
|
pool.events.Unsubscribe()
|
||||||
close(pool.quit)
|
close(pool.quit)
|
||||||
@ -239,7 +239,7 @@ func (pool *TxPool) SetGasPrice(price *big.Int) {
|
|||||||
log.Info("Transaction pool price threshold updated", "price", price)
|
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 {
|
func (pool *TxPool) State() *state.ManagedState {
|
||||||
pool.mu.RLock()
|
pool.mu.RLock()
|
||||||
defer pool.mu.RUnlock()
|
defer pool.mu.RUnlock()
|
||||||
|
@ -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
|
// 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
|
// 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
|
// considered a revert-and-consume-all-gas operation. No error specific checks
|
||||||
|
Loading…
Reference in New Issue
Block a user