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
4c89d533
Commit
4c89d533
authored
Dec 14, 2014
by
zelig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adapt blockpool/backend to use pow/ezp with pow.Block for VerifyPoW func
parent
61940b22
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
12 deletions
+3
-12
backend.go
eth/backend.go
+3
-4
block_pool.go
eth/block_pool.go
+0
-8
No files found.
eth/backend.go
View file @
4c89d533
...
...
@@ -7,12 +7,12 @@ import (
"sync"
"github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/event"
ethlogger
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/pow/ezp"
"github.com/ethereum/go-ethereum/rpc"
"github.com/ethereum/go-ethereum/state"
)
...
...
@@ -111,9 +111,8 @@ func New(db ethutil.Database, identity p2p.ClientIdentity, keyManager *crypto.Ke
hasBlock
:=
eth
.
chainManager
.
HasBlock
insertChain
:=
eth
.
chainManager
.
InsertChain
// pow := ezp.New()
// verifyPoW := pow.Verify
verifyPoW
:=
func
(
*
types
.
Block
)
bool
{
return
true
}
pow
:=
ezp
.
New
()
verifyPoW
:=
pow
.
Verify
eth
.
blockPool
=
NewBlockPool
(
hasBlock
,
insertChain
,
verifyPoW
)
// Start the tx pool
...
...
eth/block_pool.go
View file @
4c89d533
...
...
@@ -55,11 +55,7 @@ type BlockPool struct {
// the minimal interface with blockchain
hasBlock
func
(
hash
[]
byte
)
bool
insertChain
func
(
types
.
Blocks
)
error
<<<<<<<
HEAD
verifyPoW
func
(
pow
.
Block
)
bool
=======
verifyPoW
func
(
*
types
.
Block
)
bool
>>>>>>>
blockpool
rewritten
,
tests
broken
FIXME
}
type
peerInfo
struct
{
...
...
@@ -78,11 +74,7 @@ type peerInfo struct {
quitC
chan
bool
}
<<<<<<<
HEAD
func
NewBlockPool
(
hasBlock
func
(
hash
[]
byte
)
bool
,
insertChain
func
(
types
.
Blocks
)
error
,
verifyPoW
func
(
pow
.
Block
)
bool
,
=======
func
NewBlockPool
(
hasBlock
func
(
hash
[]
byte
)
bool
,
insertChain
func
(
types
.
Blocks
)
error
,
verifyPoW
func
(
*
types
.
Block
)
bool
,
>>>>>>>
blockpool
rewritten
,
tests
broken
FIXME
)
*
BlockPool
{
return
&
BlockPool
{
hasBlock
:
hasBlock
,
...
...
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