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
7b8a47f4
Commit
7b8a47f4
authored
Mar 23, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
removed legacy code
parent
0eaa023f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
5 deletions
+2
-5
block_processor.go
core/block_processor.go
+0
-1
block.go
core/types/block.go
+1
-2
blocktest.go
tests/blocktest.go
+1
-2
No files found.
core/block_processor.go
View file @
7b8a47f4
...
...
@@ -126,7 +126,6 @@ func (self *BlockProcessor) ApplyTransactions(coinbase *state.StateObject, state
cumulativeSum
.
Add
(
cumulativeSum
,
new
(
big
.
Int
)
.
Mul
(
txGas
,
tx
.
GasPrice
()))
}
block
.
Reward
=
cumulativeSum
if
block
.
GasUsed
()
.
Cmp
(
totalUsedGas
)
!=
0
{
return
nil
,
ValidationError
(
fmt
.
Sprintf
(
"gas used error (%v / %v)"
,
block
.
GasUsed
(),
totalUsedGas
))
}
...
...
core/types/block.go
View file @
7b8a47f4
...
...
@@ -99,7 +99,6 @@ type Block struct {
Td
*
big
.
Int
receipts
Receipts
Reward
*
big
.
Int
}
// StorageBlock defines the RLP encoding of a Block stored in the
...
...
@@ -134,7 +133,7 @@ func NewBlock(parentHash common.Hash, coinbase common.Address, root common.Hash,
GasLimit
:
new
(
big
.
Int
),
}
header
.
SetNonce
(
nonce
)
block
:=
&
Block
{
header
:
header
,
Reward
:
new
(
big
.
Int
)
}
block
:=
&
Block
{
header
:
header
}
return
block
}
...
...
tests/blocktest.go
View file @
7b8a47f4
...
...
@@ -13,9 +13,9 @@ import (
"strings"
"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/rlp"
"github.com/ethereum/go-ethereum/core/state"
)
// Block Test JSON Format
...
...
@@ -172,7 +172,6 @@ func mustConvertGenesis(testGenesis btHeader) *types.Block {
hdr
.
Number
=
big
.
NewInt
(
0
)
b
:=
types
.
NewBlockWithHeader
(
hdr
)
b
.
Td
=
new
(
big
.
Int
)
b
.
Reward
=
new
(
big
.
Int
)
return
b
}
...
...
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