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
32fbc0d3
Commit
32fbc0d3
authored
Jan 28, 2015
by
obscuren
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into qt5.4
parents
adda54ac
1337a8df
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
5 deletions
+11
-5
Dockerfile
Dockerfile
+2
-2
chain_manager.go
core/chain_manager.go
+7
-1
block_pool.go
eth/block_pool.go
+1
-1
protocol.go
eth/protocol.go
+1
-1
No files found.
Dockerfile
View file @
32fbc0d3
...
@@ -13,8 +13,8 @@ RUN apt-get update && apt-get upgrade -y
...
@@ -13,8 +13,8 @@ RUN apt-get update && apt-get upgrade -y
RUN
apt-get
install
-y
git mercurial build-essential software-properties-common pkg-config libgmp3-dev libreadline6-dev libpcre3-dev libpcre++-dev
RUN
apt-get
install
-y
git mercurial build-essential software-properties-common pkg-config libgmp3-dev libreadline6-dev libpcre3-dev libpcre++-dev
## Build and install Go
## Build and install Go
RUN
hg clone
-u
release https://code.google.com/p
/go
RUN
git clone https://go.googlesource.com
/go
RUN
cd
go
&&
hg update go1.4
RUN
cd
go
&&
git checkout go1.4.1
RUN
cd
go/src
&&
./all.bash
&&
go version
RUN
cd
go/src
&&
./all.bash
&&
go version
## Install GUI dependencies
## Install GUI dependencies
...
...
core/chain_manager.go
View file @
32fbc0d3
...
@@ -251,7 +251,13 @@ func (self *ChainManager) GetBlockHashesFromHash(hash []byte, max uint64) (chain
...
@@ -251,7 +251,13 @@ func (self *ChainManager) GetBlockHashesFromHash(hash []byte, max uint64) (chain
// XXX Could be optimised by using a different database which only holds hashes (i.e., linked list)
// XXX Could be optimised by using a different database which only holds hashes (i.e., linked list)
for
i
:=
uint64
(
0
);
i
<
max
;
i
++
{
for
i
:=
uint64
(
0
);
i
<
max
;
i
++
{
block
=
self
.
GetBlock
(
block
.
Header
()
.
ParentHash
)
parentHash
:=
block
.
Header
()
.
ParentHash
block
=
self
.
GetBlock
(
parentHash
)
if
block
==
nil
{
chainlogger
.
Infof
(
"GetBlockHashesFromHash Parent UNKNOWN %x
\n
"
,
parentHash
)
break
}
chain
=
append
(
chain
,
block
.
Hash
())
chain
=
append
(
chain
,
block
.
Hash
())
if
block
.
Header
()
.
Number
.
Cmp
(
ethutil
.
Big0
)
<=
0
{
if
block
.
Header
()
.
Number
.
Cmp
(
ethutil
.
Big0
)
<=
0
{
break
break
...
...
eth/block_pool.go
View file @
32fbc0d3
...
@@ -1098,7 +1098,7 @@ func (self *BlockPool) requestBlocks(attempts int, hashes [][]byte) {
...
@@ -1098,7 +1098,7 @@ func (self *BlockPool) requestBlocks(attempts int, hashes [][]byte) {
poolLogger
.
Debugf
(
"request %v missing blocks from %v/%v peers: chosen %v"
,
len
(
hashes
),
repetitions
,
peerCount
,
indexes
)
poolLogger
.
Debugf
(
"request %v missing blocks from %v/%v peers: chosen %v"
,
len
(
hashes
),
repetitions
,
peerCount
,
indexes
)
for
_
,
peer
:=
range
self
.
peers
{
for
_
,
peer
:=
range
self
.
peers
{
if
i
==
indexes
[
0
]
{
if
i
==
indexes
[
0
]
{
poolLogger
.
Debugf
(
"request %v missing blocks
from peer %s"
,
len
(
hashes
)
,
peer
.
id
)
poolLogger
.
Debugf
(
"request %v missing blocks
[%x/%x] from peer %s"
,
len
(
hashes
),
hashes
[
0
][
:
4
],
hashes
[
len
(
hashes
)
-
1
][
:
4
]
,
peer
.
id
)
peer
.
requestBlocks
(
hashes
)
peer
.
requestBlocks
(
hashes
)
indexes
=
indexes
[
1
:
]
indexes
=
indexes
[
1
:
]
if
len
(
indexes
)
==
0
{
if
len
(
indexes
)
==
0
{
...
...
eth/protocol.go
View file @
32fbc0d3
...
@@ -13,7 +13,7 @@ import (
...
@@ -13,7 +13,7 @@ import (
)
)
const
(
const
(
ProtocolVersion
=
5
1
ProtocolVersion
=
5
2
NetworkId
=
0
NetworkId
=
0
ProtocolLength
=
uint64
(
8
)
ProtocolLength
=
uint64
(
8
)
ProtocolMaxMsgSize
=
10
*
1024
*
1024
ProtocolMaxMsgSize
=
10
*
1024
*
1024
...
...
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