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
9ee6295c
Commit
9ee6295c
authored
Jun 11, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor changes
parent
1bf6f8b4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
block_chain.go
ethchain/block_chain.go
+1
-2
miner.go
ethminer/miner.go
+2
-1
peer.go
peer.go
+2
-2
No files found.
ethchain/block_chain.go
View file @
9ee6295c
...
...
@@ -271,7 +271,7 @@ func (bc *BlockChain) GetChain(hash []byte, amount int) []*Block {
func
AddTestNetFunds
(
block
*
Block
)
{
for
_
,
addr
:=
range
[]
string
{
"
8a40bfaa73256b60764c1bf40675a99083efb075
"
,
"
51ba59315b3a95761d0863b05ccc7a7f54703d99
"
,
"e4157b34ea9615cfbde6b4fda419828124b70c78"
,
"1e12515ce3e0f817a4ddef9ca55788a1d66bd2df"
,
"6c386a4b26f73c802f34673f7248bb118f97424a"
,
...
...
@@ -285,7 +285,6 @@ func AddTestNetFunds(block *Block) {
account
.
Amount
=
ethutil
.
Big
(
"1606938044258990275541962092341162602522202993782792835301376"
)
//ethutil.BigPow(2, 200)
block
.
state
.
UpdateStateObject
(
account
)
}
log
.
Printf
(
"%x
\n
"
,
block
.
RlpEncode
())
}
func
(
bc
*
BlockChain
)
setLastBlock
()
{
...
...
ethminer/miner.go
View file @
9ee6295c
...
...
@@ -137,7 +137,7 @@ func (self *Miner) mineNewBlock() {
// Sort the transactions by nonce in case of odd network propagation
sort
.
Sort
(
ethchain
.
TxByNonce
{
self
.
txs
})
// Accumulate all valid transaction and apply them to the new state
receipts
,
txs
:=
stateManager
.
ApplyTransactions
(
self
.
block
.
State
(),
self
.
block
,
self
.
txs
)
receipts
,
txs
:=
stateManager
.
ApplyTransactions
(
self
.
block
.
Coinbase
,
self
.
block
.
State
(),
self
.
block
,
self
.
txs
)
self
.
txs
=
txs
// Set the transactions to the block so the new SHA3 can be calculated
self
.
block
.
SetReceipts
(
receipts
,
txs
)
...
...
@@ -155,6 +155,7 @@ func (self *Miner) mineNewBlock() {
}
else
{
self
.
ethereum
.
Broadcast
(
ethwire
.
MsgBlockTy
,
[]
interface
{}{
self
.
block
.
Value
()
.
Val
})
ethutil
.
Config
.
Log
.
Infof
(
"[MINER] 🔨 Mined block %x
\n
"
,
self
.
block
.
Hash
())
ethutil
.
Config
.
Log
.
Infoln
(
self
.
block
)
// Gather the new batch of transactions currently in the tx pool
self
.
txs
=
self
.
ethereum
.
TxPool
()
.
CurrentTransactions
()
}
...
...
peer.go
View file @
9ee6295c
...
...
@@ -17,7 +17,7 @@ const (
// The size of the output buffer for writing messages
outputBufferSize
=
50
// Current protocol version
ProtocolVersion
=
17
ProtocolVersion
=
20
)
type
DiscReason
byte
...
...
@@ -603,7 +603,7 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) {
c
:=
msg
.
Data
if
c
.
Get
(
0
)
.
Uint
()
!=
ProtocolVersion
{
ethutil
.
Config
.
Log
.
Debug
ln
(
"Invalid peer version. Require protocol:"
,
ProtocolVersion
)
ethutil
.
Config
.
Log
.
Debug
f
(
"Invalid peer version. Require protocol: %d. Received: %d
\n
"
,
ProtocolVersion
,
c
.
Get
(
0
)
.
Uint
()
)
p
.
Stop
()
return
}
...
...
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