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
b8124ec7
Commit
b8124ec7
authored
Apr 01, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed old (unused) argument
parent
219d94c1
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
9 deletions
+9
-9
block_processor.go
core/block_processor.go
+2
-2
chain_makers.go
core/chain_makers.go
+2
-2
state_test.go
core/state/state_test.go
+1
-1
statedb.go
core/state/statedb.go
+1
-1
worker.go
miner/worker.go
+1
-1
blocktest.go
tests/blocktest.go
+1
-1
vm.go
tests/helper/vm.go
+1
-1
No files found.
core/block_processor.go
View file @
b8124ec7
...
...
@@ -84,7 +84,7 @@ func (self *BlockProcessor) ApplyTransaction(coinbase *state.StateObject, stated
}
// Update the state with pending changes
statedb
.
Update
(
nil
)
statedb
.
Update
()
cumulative
:=
new
(
big
.
Int
)
.
Set
(
usedGas
.
Add
(
usedGas
,
gas
))
receipt
:=
types
.
NewReceipt
(
statedb
.
Root
()
.
Bytes
(),
cumulative
)
...
...
@@ -220,7 +220,7 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (td *big
// Commit state objects/accounts to a temporary trie (does not save)
// used to calculate the state root.
state
.
Update
(
common
.
Big0
)
state
.
Update
()
if
header
.
Root
!=
state
.
Root
()
{
err
=
fmt
.
Errorf
(
"invalid merkle root. received=%x got=%x"
,
header
.
Root
,
state
.
Root
())
return
...
...
core/chain_makers.go
View file @
b8124ec7
...
...
@@ -5,10 +5,10 @@ import (
"math/big"
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/pow"
"github.com/ethereum/go-ethereum/core/state"
)
// So we can generate blocks easily
...
...
@@ -81,7 +81,7 @@ func makeBlock(bman *BlockProcessor, parent *types.Block, i int, db common.Datab
cbase
:=
state
.
GetOrNewStateObject
(
addr
)
cbase
.
SetGasPool
(
CalcGasLimit
(
parent
,
block
))
cbase
.
AddBalance
(
BlockReward
)
state
.
Update
(
common
.
Big0
)
state
.
Update
()
block
.
SetRoot
(
state
.
Root
())
return
block
}
...
...
core/state/state_test.go
View file @
b8124ec7
...
...
@@ -72,7 +72,7 @@ func TestNull(t *testing.T) {
//value := common.FromHex("0x823140710bf13990e4500136726d8b55")
value
:=
make
([]
byte
,
16
)
state
.
SetState
(
address
,
common
.
Hash
{},
value
)
state
.
Update
(
nil
)
state
.
Update
()
state
.
Sync
()
value
=
state
.
GetState
(
address
,
common
.
Hash
{})
}
...
...
core/state/statedb.go
View file @
b8124ec7
...
...
@@ -316,7 +316,7 @@ func (self *StateDB) Refunds() map[string]*big.Int {
return
self
.
refund
}
func
(
self
*
StateDB
)
Update
(
gasUsed
*
big
.
Int
)
{
func
(
self
*
StateDB
)
Update
()
{
self
.
refund
=
make
(
map
[
string
]
*
big
.
Int
)
for
_
,
stateObject
:=
range
self
.
stateObjects
{
...
...
miner/worker.go
View file @
b8124ec7
...
...
@@ -272,7 +272,7 @@ gasLimit:
core
.
AccumulateRewards
(
self
.
current
.
state
,
self
.
current
.
block
)
self
.
current
.
state
.
Update
(
common
.
Big0
)
self
.
current
.
state
.
Update
()
self
.
push
()
}
...
...
tests/blocktest.go
View file @
b8124ec7
...
...
@@ -114,7 +114,7 @@ func (t *BlockTest) InsertPreState(db common.Database) (*state.StateDB, error) {
}
}
// sync objects to trie
statedb
.
Update
(
nil
)
statedb
.
Update
()
// sync trie to disk
statedb
.
Sync
()
...
...
tests/helper/vm.go
View file @
b8124ec7
...
...
@@ -185,7 +185,7 @@ func RunState(statedb *state.StateDB, env, tx map[string]string) ([]byte, state.
if
core
.
IsNonceErr
(
err
)
||
core
.
IsInvalidTxErr
(
err
)
{
statedb
.
Set
(
snapshot
)
}
statedb
.
Update
(
vmenv
.
Gas
)
statedb
.
Update
()
return
ret
,
vmenv
.
logs
,
vmenv
.
Gas
,
err
}
...
...
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