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
1b7cba18
Commit
1b7cba18
authored
Jan 24, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated peers
parent
233f5200
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
9 deletions
+9
-9
ethereum.go
ethereum.go
+1
-1
peer.go
peer.go
+8
-8
No files found.
ethereum.go
View file @
1b7cba18
...
...
@@ -60,7 +60,7 @@ func New() (*Ethereum, error) {
}
ethereum
.
TxPool
=
ethchain
.
NewTxPool
()
ethereum
.
TxPool
.
Speaker
=
ethereum
ethereum
.
BlockManager
=
ethchain
.
NewBlockManager
()
ethereum
.
BlockManager
=
ethchain
.
NewBlockManager
(
ethereum
)
ethereum
.
TxPool
.
BlockManager
=
ethereum
.
BlockManager
ethereum
.
BlockManager
.
TransactionPool
=
ethereum
.
TxPool
...
...
peer.go
View file @
1b7cba18
...
...
@@ -128,7 +128,7 @@ out:
p
.
lastSend
=
time
.
Now
()
case
<-
tickleTimer
.
C
:
p
.
writeMessage
(
&
ethwire
.
Msg
{
Type
:
ethwire
.
MsgPingTy
}
)
p
.
writeMessage
(
ethwire
.
NewMessage
(
ethwire
.
MsgPingTy
,
""
)
)
// Break out of the for loop if a quit message is posted
case
<-
p
.
quit
:
...
...
@@ -170,12 +170,12 @@ out:
// Version message
p
.
handleHandshake
(
msg
)
case
ethwire
.
MsgBlockTy
:
/*
err := p.ethereum.BlockManager.ProcessBlock(ethchain.NewBlock(msg.Data)
)
if err != nil {
log.Println(err)
}
*/
block
:=
ethchain
.
NewBlockFromRlpValue
(
msg
.
Data
.
Get
(
0
))
block
.
MakeContracts
(
)
err
:=
p
.
ethereum
.
BlockManager
.
ProcessBlock
(
block
)
if
err
!=
nil
{
log
.
Println
(
err
)
}
case
ethwire
.
MsgTxTy
:
//p.ethereum.TxPool.QueueTransaction(ethchain.NewTransactionFromData(msg.Data))
p
.
ethereum
.
TxPool
.
QueueTransaction
(
ethchain
.
NewTransactionFromRlpValue
(
msg
.
Data
.
Get
(
0
)))
...
...
@@ -203,7 +203,7 @@ out:
}
case
ethwire
.
MsgPingTy
:
// Respond back with pong
p
.
QueueMessage
(
&
ethwire
.
Msg
{
Type
:
ethwire
.
MsgPongTy
}
)
p
.
QueueMessage
(
ethwire
.
NewMessage
(
ethwire
.
MsgPongTy
,
""
)
)
case
ethwire
.
MsgPongTy
:
p
.
lastPong
=
time
.
Now
()
.
Unix
()
}
...
...
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