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
5e4d77b2
Commit
5e4d77b2
authored
Dec 10, 2014
by
zelig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
initial commit for eth blockpool + test
parent
2dd8f411
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
block_pool.go
eth/block_pool.go
+3
-2
No files found.
eth/block_pool.go
View file @
5e4d77b2
...
...
@@ -11,6 +11,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethutil"
ethlogger
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/pow"
)
var
poolLogger
=
ethlogger
.
NewLogger
(
"Blockpool"
)
...
...
@@ -54,7 +55,7 @@ type BlockPool struct {
// the minimal interface with blockchain
hasBlock
func
(
hash
[]
byte
)
bool
insertChain
func
(
types
.
Blocks
)
error
verifyPoW
func
(
*
types
.
Block
)
bool
verifyPoW
func
(
pow
.
Block
)
bool
}
type
peerInfo
struct
{
...
...
@@ -73,7 +74,7 @@ type peerInfo struct {
quitC
chan
bool
}
func
NewBlockPool
(
hasBlock
func
(
hash
[]
byte
)
bool
,
insertChain
func
(
types
.
Blocks
)
error
,
verifyPoW
func
(
*
types
.
Block
)
bool
,
func
NewBlockPool
(
hasBlock
func
(
hash
[]
byte
)
bool
,
insertChain
func
(
types
.
Blocks
)
error
,
verifyPoW
func
(
pow
.
Block
)
bool
,
)
*
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