good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
5e4d77b2
Commit
5e4d77b2
authored
Dec 10, 2014
by
Viktor Trón
Browse files
Options
Downloads
Patches
Plain Diff
initial commit for eth blockpool + test
parent
2dd8f411
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
eth/block_pool.go
+3
-2
3 additions, 2 deletions
eth/block_pool.go
with
3 additions
and
2 deletions
eth/block_pool.go
+
3
−
2
View file @
5e4d77b2
...
@@ -11,6 +11,7 @@ import (
...
@@ -11,6 +11,7 @@ import (
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/ethutil"
ethlogger
"github.com/ethereum/go-ethereum/logger"
ethlogger
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/pow"
)
)
var
poolLogger
=
ethlogger
.
NewLogger
(
"Blockpool"
)
var
poolLogger
=
ethlogger
.
NewLogger
(
"Blockpool"
)
...
@@ -54,7 +55,7 @@ type BlockPool struct {
...
@@ -54,7 +55,7 @@ type BlockPool struct {
// the minimal interface with blockchain
// the minimal interface with blockchain
hasBlock
func
(
hash
[]
byte
)
bool
hasBlock
func
(
hash
[]
byte
)
bool
insertChain
func
(
types
.
Blocks
)
error
insertChain
func
(
types
.
Blocks
)
error
verifyPoW
func
(
*
types
.
Block
)
bool
verifyPoW
func
(
pow
.
Block
)
bool
}
}
type
peerInfo
struct
{
type
peerInfo
struct
{
...
@@ -73,7 +74,7 @@ type peerInfo struct {
...
@@ -73,7 +74,7 @@ type peerInfo struct {
quitC
chan
bool
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
{
)
*
BlockPool
{
return
&
BlockPool
{
return
&
BlockPool
{
hasBlock
:
hasBlock
,
hasBlock
:
hasBlock
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment