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
f78bd4d5
Commit
f78bd4d5
authored
Jan 12, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Format
parent
e280a2a7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
11 deletions
+8
-11
block_manager.go
block_manager.go
+3
-5
peer.go
peer.go
+5
-6
No files found.
block_manager.go
View file @
f78bd4d5
package
main
package
main
import
(
import
(
"errors"
"fmt"
"fmt"
"github.com/ethereum/ethutil-go"
"github.com/ethereum/ethutil-go"
"errors"
"log"
"log"
"math/big"
"math/big"
)
)
...
@@ -24,7 +24,6 @@ func NewBlockChain() *BlockChain {
...
@@ -24,7 +24,6 @@ func NewBlockChain() *BlockChain {
bc
.
TD
=
new
(
big
.
Int
)
bc
.
TD
=
new
(
big
.
Int
)
bc
.
TD
.
SetBytes
(
ethutil
.
Config
.
Db
.
LastKnownTD
())
bc
.
TD
.
SetBytes
(
ethutil
.
Config
.
Db
.
LastKnownTD
())
// TODO get last block from the database
// TODO get last block from the database
//bc.LastBlock = bc.genesisBlock
//bc.LastBlock = bc.genesisBlock
...
@@ -175,7 +174,6 @@ func (bm *BlockManager) AccumelateRewards(block *ethutil.Block) error {
...
@@ -175,7 +174,6 @@ func (bm *BlockManager) AccumelateRewards(block *ethutil.Block) error {
// TODO Reward each uncle
// TODO Reward each uncle
return
nil
return
nil
}
}
...
...
peer.go
View file @
f78bd4d5
package
main
package
main
import
(
import
(
"github.com/ethereum/ethwire-go"
"github.com/ethereum/ethutil-go"
"github.com/ethereum/ethutil-go"
"github.com/ethereum/ethwire-go"
"log"
"log"
"net"
"net"
)
)
...
@@ -32,7 +32,7 @@ func NewPeer(conn net.Conn, server *Server, inbound bool) *Peer {
...
@@ -32,7 +32,7 @@ func NewPeer(conn net.Conn, server *Server, inbound bool) *Peer {
// Outputs any RLP encoded data to the peer
// Outputs any RLP encoded data to the peer
func
(
p
*
Peer
)
QueueMessage
(
msg
*
ethwire
.
InOutMsg
)
{
func
(
p
*
Peer
)
QueueMessage
(
msg
*
ethwire
.
InOutMsg
)
{
p
.
outputQueue
<-
msg
//ethwire.InOutMsg{MsgType: msgType, Nonce: ethutil.RandomUint64(), Data: data}
p
.
outputQueue
<-
msg
//ethwire.InOutMsg{MsgType: msgType, Nonce: ethutil.RandomUint64(), Data: data}
}
}
// Outbound message handler. Outbound messages are handled here
// Outbound message handler. Outbound messages are handled here
...
@@ -145,4 +145,3 @@ func (p *Peer) handleVersionAck(msg *ethwire.InOutMsg) {
...
@@ -145,4 +145,3 @@ func (p *Peer) handleVersionAck(msg *ethwire.InOutMsg) {
}
}
}
}
}
}
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