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
f3818478
Commit
f3818478
authored
Apr 24, 2014
by
obscuren
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed debug & unused functions
parent
ee7c16a8
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
26 deletions
+0
-26
block.go
ethchain/block.go
+0
-25
miner.go
ethminer/miner.go
+0
-1
No files found.
ethchain/block.go
View file @
f3818478
...
@@ -116,11 +116,6 @@ func (block *Block) HashNoNonce() []byte {
...
@@ -116,11 +116,6 @@ func (block *Block) HashNoNonce() []byte {
return
ethutil
.
Sha3Bin
(
ethutil
.
Encode
([]
interface
{}{
block
.
PrevHash
,
block
.
UncleSha
,
block
.
Coinbase
,
block
.
state
.
trie
.
Root
,
block
.
TxSha
,
block
.
Difficulty
,
block
.
Time
,
block
.
Extra
}))
return
ethutil
.
Sha3Bin
(
ethutil
.
Encode
([]
interface
{}{
block
.
PrevHash
,
block
.
UncleSha
,
block
.
Coinbase
,
block
.
state
.
trie
.
Root
,
block
.
TxSha
,
block
.
Difficulty
,
block
.
Time
,
block
.
Extra
}))
}
}
func
(
block
*
Block
)
PrintHash
()
{
fmt
.
Println
(
block
)
fmt
.
Println
(
ethutil
.
NewValue
(
ethutil
.
Encode
([]
interface
{}{
block
.
PrevHash
,
block
.
UncleSha
,
block
.
Coinbase
,
block
.
state
.
trie
.
Root
,
block
.
TxSha
,
block
.
Difficulty
,
block
.
Time
,
block
.
Extra
,
block
.
Nonce
})))
}
func
(
block
*
Block
)
State
()
*
State
{
func
(
block
*
Block
)
State
()
*
State
{
return
block
.
state
return
block
.
state
}
}
...
@@ -182,26 +177,6 @@ func (block *Block) MakeContract(tx *Transaction) {
...
@@ -182,26 +177,6 @@ func (block *Block) MakeContract(tx *Transaction) {
}
}
/////// Block Encoding
/////// Block Encoding
func
(
block
*
Block
)
encodedUncles
()
interface
{}
{
uncles
:=
make
([]
interface
{},
len
(
block
.
Uncles
))
for
i
,
uncle
:=
range
block
.
Uncles
{
uncles
[
i
]
=
uncle
.
RlpEncode
()
}
return
uncles
}
func
(
block
*
Block
)
encodedTxs
()
interface
{}
{
// Marshal the transactions of this block
encTx
:=
make
([]
interface
{},
len
(
block
.
transactions
))
for
i
,
tx
:=
range
block
.
transactions
{
// Cast it to a string (safe)
encTx
[
i
]
=
tx
.
RlpData
()
}
return
encTx
}
func
(
block
*
Block
)
rlpTxs
()
interface
{}
{
func
(
block
*
Block
)
rlpTxs
()
interface
{}
{
// Marshal the transactions of this block
// Marshal the transactions of this block
encTx
:=
make
([]
interface
{},
len
(
block
.
transactions
))
encTx
:=
make
([]
interface
{},
len
(
block
.
transactions
))
...
...
ethminer/miner.go
View file @
f3818478
...
@@ -145,7 +145,6 @@ func (miner *Miner) listener() {
...
@@ -145,7 +145,6 @@ func (miner *Miner) listener() {
*/
*/
miner
.
ethereum
.
Broadcast
(
ethwire
.
MsgBlockTy
,
[]
interface
{}{
miner
.
block
.
Value
()
.
Val
})
miner
.
ethereum
.
Broadcast
(
ethwire
.
MsgBlockTy
,
[]
interface
{}{
miner
.
block
.
Value
()
.
Val
})
log
.
Printf
(
"[MINER] 🔨 Mined block %x
\n
"
,
miner
.
block
.
Hash
())
log
.
Printf
(
"[MINER] 🔨 Mined block %x
\n
"
,
miner
.
block
.
Hash
())
log
.
Println
(
miner
.
block
)
miner
.
txs
=
[]
*
ethchain
.
Transaction
{}
// Move this somewhere neat
miner
.
txs
=
[]
*
ethchain
.
Transaction
{}
// Move this somewhere neat
miner
.
block
=
miner
.
ethereum
.
BlockChain
()
.
NewBlock
(
miner
.
coinbase
,
miner
.
txs
)
miner
.
block
=
miner
.
ethereum
.
BlockChain
()
.
NewBlock
(
miner
.
coinbase
,
miner
.
txs
)
...
...
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