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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
7b2fc064
Commit
7b2fc064
authored
8 years ago
by
Felix Lange
Browse files
Options
Downloads
Patches
Plain Diff
core, light: delete SplitStatTy, ChainSplitEvent (unused)
parent
d2fda73a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
core/blockchain.go
+3
-6
3 additions, 6 deletions
core/blockchain.go
core/events.go
+0
-6
0 additions, 6 deletions
core/events.go
light/lightchain.go
+0
-3
0 additions, 3 deletions
light/lightchain.go
with
3 additions
and
15 deletions
core/blockchain.go
+
3
−
6
View file @
7b2fc064
...
...
@@ -628,7 +628,6 @@ type WriteStatus byte
const
(
NonStatTy
WriteStatus
=
iota
CanonStatTy
SplitStatTy
SideStatTy
)
...
...
@@ -1029,9 +1028,6 @@ func (self *BlockChain) InsertChain(chain types.Blocks) (int, error) {
blockInsertTimer
.
UpdateSince
(
bstart
)
events
=
append
(
events
,
ChainSideEvent
{
block
})
case
SplitStatTy
:
events
=
append
(
events
,
ChainSplitEvent
{
block
,
logs
})
}
stats
.
processed
++
stats
.
usedGas
+=
usedGas
.
Uint64
()
...
...
@@ -1226,8 +1222,9 @@ func (self *BlockChain) postChainEvents(events []interface{}, logs []*types.Log)
self
.
eventMux
.
Post
(
logs
)
for
_
,
event
:=
range
events
{
if
event
,
ok
:=
event
.
(
ChainEvent
);
ok
{
// We need some control over the mining operation. Acquiring locks and waiting for the miner to create new block takes too long
// and in most cases isn't even necessary.
// We need some control over the mining operation. Acquiring locks and waiting
// for the miner to create new block takes too long and in most cases isn't
// even necessary.
if
self
.
LastBlockHash
()
==
event
.
Hash
{
self
.
eventMux
.
Post
(
ChainHeadEvent
{
event
.
Block
})
}
...
...
This diff is collapsed.
Click to expand it.
core/events.go
+
0
−
6
View file @
7b2fc064
...
...
@@ -46,12 +46,6 @@ type RemovedTransactionEvent struct{ Txs types.Transactions }
// RemovedLogEvent is posted when a reorg happens
type
RemovedLogsEvent
struct
{
Logs
[]
*
types
.
Log
}
// ChainSplit is posted when a new head is detected
type
ChainSplitEvent
struct
{
Block
*
types
.
Block
Logs
[]
*
types
.
Log
}
type
ChainEvent
struct
{
Block
*
types
.
Block
Hash
common
.
Hash
...
...
This diff is collapsed.
Click to expand it.
light/lightchain.go
+
0
−
3
View file @
7b2fc064
...
...
@@ -377,9 +377,6 @@ func (self *LightChain) InsertHeaderChain(chain []*types.Header, checkFreq int)
case
core
.
SideStatTy
:
log
.
Debug
(
"Inserted forked header"
,
"number"
,
header
.
Number
,
"hash"
,
header
.
Hash
())
events
=
append
(
events
,
core
.
ChainSideEvent
{
Block
:
types
.
NewBlockWithHeader
(
header
)})
case
core
.
SplitStatTy
:
events
=
append
(
events
,
core
.
ChainSplitEvent
{
Block
:
types
.
NewBlockWithHeader
(
header
)})
}
return
err
}
...
...
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