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
f4b717cb
Commit
f4b717cb
authored
Nov 04, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bloom validation
parent
f59a3b67
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
block_manager.go
chain/block_manager.go
+5
-4
No files found.
chain/block_manager.go
View file @
f4b717cb
...
...
@@ -3,6 +3,7 @@ package chain
import
(
"bytes"
"container/list"
"errors"
"fmt"
"math/big"
"os"
...
...
@@ -168,7 +169,6 @@ done:
erroneous
=
append
(
erroneous
,
tx
)
err
=
nil
continue
//return nil, nil, nil, err
}
}
...
...
@@ -177,7 +177,6 @@ done:
txGas
.
Sub
(
txGas
,
st
.
gas
)
cumulative
:=
new
(
big
.
Int
)
.
Set
(
totalUsedGas
.
Add
(
totalUsedGas
,
txGas
))
//receipt := &Receipt{tx, ethutil.CopyBytes(state.Root().([]byte)), accumelative}
receipt
:=
&
Receipt
{
ethutil
.
CopyBytes
(
state
.
Root
()
.
([]
byte
)),
cumulative
,
LogsBloom
(
state
.
Logs
())
.
Bytes
(),
state
.
Logs
()}
if
i
<
len
(
block
.
Receipts
())
{
...
...
@@ -254,8 +253,6 @@ func (sm *BlockManager) Process(block *Block) (err error) {
return
fmt
.
Errorf
(
"Error validating receipt sha. Received %x, got %x"
,
block
.
ReceiptSha
,
receiptSha
)
}
// TODO validate bloom
// Block validation
if
err
=
sm
.
ValidateBlock
(
block
);
err
!=
nil
{
statelogger
.
Errorln
(
"Error validating block:"
,
err
)
...
...
@@ -267,6 +264,10 @@ func (sm *BlockManager) Process(block *Block) (err error) {
return
err
}
if
bytes
.
Compare
(
CreateBloom
(
block
),
block
.
LogsBloom
)
!=
0
{
return
errors
.
New
(
"Unable to replicate block's bloom"
)
}
state
.
Update
()
if
!
block
.
State
()
.
Cmp
(
state
)
{
...
...
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