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
590aace8
Commit
590aace8
authored
Dec 18, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed ethereum as dependency
parent
4b2f1f76
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
block_manager.go
core/block_manager.go
+7
-7
No files found.
core/block_manager.go
View file @
590aace8
...
@@ -58,8 +58,8 @@ type BlockManager struct {
...
@@ -58,8 +58,8 @@ type BlockManager struct {
mem
map
[
string
]
*
big
.
Int
mem
map
[
string
]
*
big
.
Int
// Proof of work used for validating
// Proof of work used for validating
Pow
pow
.
PoW
Pow
pow
.
PoW
// The ethereum manager interface
eth
EthManager
txpool
*
TxPool
// The last attempted block is mainly used for debugging purposes
// The last attempted block is mainly used for debugging purposes
// This does not have to be a valid block and will be set during
// This does not have to be a valid block and will be set during
...
@@ -71,13 +71,13 @@ type BlockManager struct {
...
@@ -71,13 +71,13 @@ type BlockManager struct {
eventMux
*
event
.
TypeMux
eventMux
*
event
.
TypeMux
}
}
func
NewBlockManager
(
ethereum
EthManager
)
*
BlockManager
{
func
NewBlockManager
(
txpool
*
TxPool
,
chainManager
*
ChainManager
,
eventMux
*
event
.
TypeMux
)
*
BlockManager
{
sm
:=
&
BlockManager
{
sm
:=
&
BlockManager
{
mem
:
make
(
map
[
string
]
*
big
.
Int
),
mem
:
make
(
map
[
string
]
*
big
.
Int
),
Pow
:
ezp
.
New
(),
Pow
:
ezp
.
New
(),
eth
:
ethereum
,
bc
:
chainManager
,
bc
:
ethereum
.
ChainManager
()
,
eventMux
:
eventMux
,
eventMux
:
ethereum
.
EventMux
()
,
txpool
:
txpool
,
}
}
return
sm
return
sm
...
@@ -240,7 +240,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
...
@@ -240,7 +240,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
chainlogger
.
Infof
(
"Processed block #%d (%x...)
\n
"
,
block
.
Number
,
block
.
Hash
()[
0
:
4
])
chainlogger
.
Infof
(
"Processed block #%d (%x...)
\n
"
,
block
.
Number
,
block
.
Hash
()[
0
:
4
])
sm
.
eth
.
TxPool
()
.
RemoveSet
(
block
.
Transactions
())
sm
.
txpool
.
RemoveSet
(
block
.
Transactions
())
return
td
,
messages
,
nil
return
td
,
messages
,
nil
}
else
{
}
else
{
...
...
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