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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
9ee6295c
Commit
9ee6295c
authored
Jun 11, 2014
by
Jeffrey Wilcke
Browse files
Options
Downloads
Patches
Plain Diff
Minor changes
parent
1bf6f8b4
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
ethchain/block_chain.go
+1
-2
1 addition, 2 deletions
ethchain/block_chain.go
ethminer/miner.go
+2
-1
2 additions, 1 deletion
ethminer/miner.go
peer.go
+2
-2
2 additions, 2 deletions
peer.go
with
5 additions
and
5 deletions
ethchain/block_chain.go
+
1
−
2
View file @
9ee6295c
...
@@ -271,7 +271,7 @@ func (bc *BlockChain) GetChain(hash []byte, amount int) []*Block {
...
@@ -271,7 +271,7 @@ func (bc *BlockChain) GetChain(hash []byte, amount int) []*Block {
func
AddTestNetFunds
(
block
*
Block
)
{
func
AddTestNetFunds
(
block
*
Block
)
{
for
_
,
addr
:=
range
[]
string
{
for
_
,
addr
:=
range
[]
string
{
"
8a40bfaa73256b60764c1bf40675a99083efb075
"
,
"
51ba59315b3a95761d0863b05ccc7a7f54703d99
"
,
"e4157b34ea9615cfbde6b4fda419828124b70c78"
,
"e4157b34ea9615cfbde6b4fda419828124b70c78"
,
"1e12515ce3e0f817a4ddef9ca55788a1d66bd2df"
,
"1e12515ce3e0f817a4ddef9ca55788a1d66bd2df"
,
"6c386a4b26f73c802f34673f7248bb118f97424a"
,
"6c386a4b26f73c802f34673f7248bb118f97424a"
,
...
@@ -285,7 +285,6 @@ func AddTestNetFunds(block *Block) {
...
@@ -285,7 +285,6 @@ func AddTestNetFunds(block *Block) {
account
.
Amount
=
ethutil
.
Big
(
"1606938044258990275541962092341162602522202993782792835301376"
)
//ethutil.BigPow(2, 200)
account
.
Amount
=
ethutil
.
Big
(
"1606938044258990275541962092341162602522202993782792835301376"
)
//ethutil.BigPow(2, 200)
block
.
state
.
UpdateStateObject
(
account
)
block
.
state
.
UpdateStateObject
(
account
)
}
}
log
.
Printf
(
"%x
\n
"
,
block
.
RlpEncode
())
}
}
func
(
bc
*
BlockChain
)
setLastBlock
()
{
func
(
bc
*
BlockChain
)
setLastBlock
()
{
...
...
This diff is collapsed.
Click to expand it.
ethminer/miner.go
+
2
−
1
View file @
9ee6295c
...
@@ -137,7 +137,7 @@ func (self *Miner) mineNewBlock() {
...
@@ -137,7 +137,7 @@ func (self *Miner) mineNewBlock() {
// Sort the transactions by nonce in case of odd network propagation
// Sort the transactions by nonce in case of odd network propagation
sort
.
Sort
(
ethchain
.
TxByNonce
{
self
.
txs
})
sort
.
Sort
(
ethchain
.
TxByNonce
{
self
.
txs
})
// Accumulate all valid transaction and apply them to the new state
// 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
self
.
txs
=
txs
// Set the transactions to the block so the new SHA3 can be calculated
// Set the transactions to the block so the new SHA3 can be calculated
self
.
block
.
SetReceipts
(
receipts
,
txs
)
self
.
block
.
SetReceipts
(
receipts
,
txs
)
...
@@ -155,6 +155,7 @@ func (self *Miner) mineNewBlock() {
...
@@ -155,6 +155,7 @@ func (self *Miner) mineNewBlock() {
}
else
{
}
else
{
self
.
ethereum
.
Broadcast
(
ethwire
.
MsgBlockTy
,
[]
interface
{}{
self
.
block
.
Value
()
.
Val
})
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
.
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
// Gather the new batch of transactions currently in the tx pool
self
.
txs
=
self
.
ethereum
.
TxPool
()
.
CurrentTransactions
()
self
.
txs
=
self
.
ethereum
.
TxPool
()
.
CurrentTransactions
()
}
}
...
...
This diff is collapsed.
Click to expand it.
peer.go
+
2
−
2
View file @
9ee6295c
...
@@ -17,7 +17,7 @@ const (
...
@@ -17,7 +17,7 @@ const (
// The size of the output buffer for writing messages
// The size of the output buffer for writing messages
outputBufferSize
=
50
outputBufferSize
=
50
// Current protocol version
// Current protocol version
ProtocolVersion
=
17
ProtocolVersion
=
20
)
)
type
DiscReason
byte
type
DiscReason
byte
...
@@ -603,7 +603,7 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) {
...
@@ -603,7 +603,7 @@ func (p *Peer) handleHandshake(msg *ethwire.Msg) {
c
:=
msg
.
Data
c
:=
msg
.
Data
if
c
.
Get
(
0
)
.
Uint
()
!=
ProtocolVersion
{
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
()
p
.
Stop
()
return
return
}
}
...
...
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