Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
c98bce70
Unverified
Commit
c98bce70
authored
May 25, 2017
by
Péter Szilágyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
core: fix minor accidental typos and comment errors
parent
17f0b119
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
8 deletions
+8
-8
blockchain.go
core/blockchain.go
+5
-5
tx_pool.go
core/tx_pool.go
+2
-2
interpreter.go
core/vm/interpreter.go
+1
-1
No files found.
core/blockchain.go
View file @
c98bce70
...
@@ -56,10 +56,10 @@ const (
...
@@ -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
badBlockLimit
=
10
// command to be run (forces the blocks to be imported again using the new algorithm)
// BlockChainVersion ensures that an incompatible database forces a resync from scratch.
BlockChainVersion
=
3
BlockChainVersion
=
3
badBlockLimit
=
10
)
)
// 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) {
...
@@ -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 {
...
@@ -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 it
bc
which creates the new head properly
// insert blocks. Order does not matter. Last block will be written in ImportChain it
self
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
)
...
...
core/tx_pool.go
View file @
c98bce70
...
@@ -209,7 +209,7 @@ func (pool *TxPool) resetState() {
...
@@ -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) {
...
@@ -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
()
...
...
core/vm/interpreter.go
View file @
c98bce70
...
@@ -91,7 +91,7 @@ func (in *Interpreter) enforceRestrictions(op OpCode, operation operation, stack
...
@@ -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 occur
r
ed.
//
//
// 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment