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
2b5fcb46
Commit
2b5fcb46
authored
Dec 10, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved interfaces
parent
5553e5aa
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
15 deletions
+10
-15
block_manager.go
core/block_manager.go
+8
-15
chain_manager.go
core/chain_manager.go
+2
-0
No files found.
core/block_manager.go
View file @
2b5fcb46
...
...
@@ -60,14 +60,6 @@ type BlockManager struct {
Pow
pow
.
PoW
// The ethereum manager interface
eth
EthManager
// The managed states
// Transiently state. The trans state isn't ever saved, validated and
// it could be used for setting account nonces without effecting
// the main states.
transState
*
state
.
StateDB
// Mining state. The mining state is used purely and solely by the mining
// operation.
miningState
*
state
.
StateDB
// The last attempted block is mainly used for debugging purposes
// This does not have to be a valid block and will be set during
...
...
@@ -75,6 +67,8 @@ type BlockManager struct {
lastAttemptedBlock
*
types
.
Block
events
event
.
Subscription
eventMux
*
event
.
TypeMux
}
func
NewBlockManager
(
ethereum
EthManager
)
*
BlockManager
{
...
...
@@ -83,6 +77,7 @@ func NewBlockManager(ethereum EthManager) *BlockManager {
Pow
:
ezp
.
New
(),
eth
:
ethereum
,
bc
:
ethereum
.
ChainManager
(),
eventMux
:
ethereum
.
EventMux
(),
}
return
sm
...
...
@@ -151,7 +146,7 @@ done:
// Notify all subscribers
if
!
transientProcess
{
go
self
.
e
th
.
EventMux
()
.
Post
(
TxPostEvent
{
tx
})
go
self
.
e
ventMux
.
Post
(
TxPostEvent
{
tx
})
}
receipts
=
append
(
receipts
,
receipt
)
...
...
@@ -245,8 +240,6 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
chainlogger
.
Infof
(
"Processed block #%d (%x...)
\n
"
,
block
.
Number
,
block
.
Hash
()[
0
:
4
])
sm
.
transState
=
state
.
Copy
()
sm
.
eth
.
TxPool
()
.
RemoveSet
(
block
.
Transactions
())
return
td
,
messages
,
nil
...
...
core/chain_manager.go
View file @
2b5fcb46
...
...
@@ -288,6 +288,8 @@ func (self *ChainManager) InsertChain(chain types.Blocks) error {
self
.
SetTotalDifficulty
(
td
)
self
.
insert
(
block
)
self
.
transState
=
self
.
State
()
.
Copy
()
//sm.eth.TxPool().RemoveSet(block.Transactions())
}
self
.
eventMux
.
Post
(
NewBlockEvent
{
block
})
...
...
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