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
3a45cdea
Commit
3a45cdea
authored
Feb 23, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved txpool start to initialisation method of ethereumm
parent
a4a4ffbe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
ethereum.go
ethereum.go
+6
-5
No files found.
ethereum.go
View file @
3a45cdea
...
...
@@ -47,6 +47,7 @@ type Ethereum struct {
Nonce
uint64
Addr
net
.
Addr
Port
string
peerMut
sync
.
Mutex
...
...
@@ -93,6 +94,9 @@ func New(caps Caps, usePnp bool) (*Ethereum, error) {
ethereum
.
TxPool
.
BlockManager
=
ethereum
.
BlockManager
ethereum
.
BlockManager
.
TransactionPool
=
ethereum
.
TxPool
// Start the tx pool
ethereum
.
TxPool
.
Start
()
return
ethereum
,
nil
}
...
...
@@ -229,7 +233,7 @@ func (s *Ethereum) ReapDeadPeerHandler() {
// Start the ethereum
func
(
s
*
Ethereum
)
Start
()
{
// Bind to addr and port
ln
,
err
:=
net
.
Listen
(
"tcp"
,
":
30303"
)
ln
,
err
:=
net
.
Listen
(
"tcp"
,
":
"
+
s
.
Port
)
if
err
!=
nil
{
log
.
Println
(
"Connection listening disabled. Acting as client"
)
}
else
{
...
...
@@ -246,9 +250,6 @@ func (s *Ethereum) Start() {
// Start the reaping processes
go
s
.
ReapDeadPeerHandler
()
// Start the tx pool
s
.
TxPool
.
Start
()
if
ethutil
.
Config
.
Seed
{
ethutil
.
Config
.
Log
.
Debugln
(
"Seeding"
)
// Testnet seed bootstrapping
...
...
@@ -306,7 +307,7 @@ func (s *Ethereum) upnpUpdateThread() {
// Go off immediately to prevent code duplication, thereafter we renew
// lease every 15 minutes.
timer
:=
time
.
NewTimer
(
0
*
time
.
Second
)
lport
,
_
:=
strconv
.
ParseInt
(
"30303"
,
10
,
16
)
lport
,
_
:=
strconv
.
ParseInt
(
s
.
Port
,
10
,
16
)
first
:=
true
out
:
for
{
...
...
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