Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
whqwjb
go-ethereum
提交
2d09e677
G
go-ethereum
项目概览
whqwjb
/
go-ethereum
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
go-ethereum
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
2d09e677
编写于
12月 18, 2014
作者:
O
obscuren
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updated to new methods
上级
49e0267f
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
16 addition
and
9 deletion
+16
-9
block_pool.go
block_pool.go
+1
-1
cmd/ethereum/main.go
cmd/ethereum/main.go
+1
-1
cmd/mist/debugger.go
cmd/mist/debugger.go
+1
-1
cmd/mist/gui.go
cmd/mist/gui.go
+2
-2
core/chain_manager.go
core/chain_manager.go
+7
-0
peer.go
peer.go
+2
-2
xeth/hexface.go
xeth/hexface.go
+1
-1
xeth/pipe.go
xeth/pipe.go
+1
-1
未找到文件。
block_pool.go
浏览文件 @
2d09e677
...
...
@@ -66,7 +66,7 @@ func (self *BlockPool) HasLatestHash() bool {
self
.
mut
.
Lock
()
defer
self
.
mut
.
Unlock
()
return
self
.
pool
[
string
(
self
.
eth
.
ChainManager
()
.
CurrentBlock
.
Hash
())]
!=
nil
return
self
.
pool
[
string
(
self
.
eth
.
ChainManager
()
.
CurrentBlock
()
.
Hash
())]
!=
nil
}
func
(
self
*
BlockPool
)
HasCommonHash
(
hash
[]
byte
)
bool
{
...
...
cmd/ethereum/main.go
浏览文件 @
2d09e677
...
...
@@ -77,7 +77,7 @@ func main() {
var
block
*
types
.
Block
if
len
(
DumpHash
)
==
0
&&
DumpNumber
==
-
1
{
block
=
ethereum
.
ChainManager
()
.
CurrentBlock
block
=
ethereum
.
ChainManager
()
.
CurrentBlock
()
}
else
if
len
(
DumpHash
)
>
0
{
block
=
ethereum
.
ChainManager
()
.
GetBlock
(
ethutil
.
Hex2Bytes
(
DumpHash
))
}
else
{
...
...
cmd/mist/debugger.go
浏览文件 @
2d09e677
...
...
@@ -149,7 +149,7 @@ func (self *DebuggerWindow) Debug(valueStr, gasStr, gasPriceStr, scriptStr, data
self
.
SetAsm
(
script
)
block
:=
self
.
lib
.
eth
.
ChainManager
()
.
CurrentBlock
block
:=
self
.
lib
.
eth
.
ChainManager
()
.
CurrentBlock
()
env
:=
utils
.
NewEnv
(
statedb
,
block
,
account
.
Address
(),
value
)
...
...
cmd/mist/gui.go
浏览文件 @
2d09e677
...
...
@@ -246,7 +246,7 @@ func (gui *Gui) CreateAndSetPrivKey() (string, string, string, string) {
}
func
(
gui
*
Gui
)
setInitialChain
(
ancientBlocks
bool
)
{
sBlk
:=
gui
.
eth
.
ChainManager
()
.
LastBlockHash
sBlk
:=
gui
.
eth
.
ChainManager
()
.
LastBlockHash
()
blk
:=
gui
.
eth
.
ChainManager
()
.
GetBlock
(
sBlk
)
for
;
blk
!=
nil
;
blk
=
gui
.
eth
.
ChainManager
()
.
GetBlock
(
sBlk
)
{
sBlk
=
blk
.
PrevHash
...
...
@@ -468,7 +468,7 @@ func (gui *Gui) update() {
case
<-
peerUpdateTicker
.
C
:
gui
.
setPeerInfo
()
case
<-
generalUpdateTicker
.
C
:
statusText
:=
"#"
+
gui
.
eth
.
ChainManager
()
.
CurrentBlock
.
Number
.
String
()
statusText
:=
"#"
+
gui
.
eth
.
ChainManager
()
.
CurrentBlock
()
.
Number
.
String
()
lastBlockLabel
.
Set
(
"text"
,
statusText
)
miningLabel
.
Set
(
"text"
,
"Mining @ "
+
strconv
.
FormatInt
(
gui
.
uiLib
.
miner
.
GetPow
()
.
GetHashrate
(),
10
)
+
"Khash"
)
...
...
core/chain_manager.go
浏览文件 @
2d09e677
...
...
@@ -74,6 +74,13 @@ func (self *ChainManager) LastBlockNumber() uint64 {
return
self
.
lastBlockNumber
}
func
(
self
*
ChainManager
)
LastBlockHash
()
[]
byte
{
self
.
mu
.
RLock
()
defer
self
.
mu
.
RUnlock
()
return
self
.
lastBlockHash
}
func
(
self
*
ChainManager
)
CurrentBlock
()
*
types
.
Block
{
self
.
mu
.
RLock
()
defer
self
.
mu
.
RUnlock
()
...
...
peer.go
浏览文件 @
2d09e677
...
...
@@ -666,8 +666,8 @@ func (self *Peer) pushStatus() {
msg
:=
wire
.
NewMessage
(
wire
.
MsgStatusTy
,
[]
interface
{}{
uint32
(
ProtocolVersion
),
uint32
(
NetVersion
),
self
.
ethereum
.
ChainManager
()
.
T
D
,
self
.
ethereum
.
ChainManager
()
.
CurrentBlock
.
Hash
(),
self
.
ethereum
.
ChainManager
()
.
T
d
()
,
self
.
ethereum
.
ChainManager
()
.
CurrentBlock
()
.
Hash
(),
self
.
ethereum
.
ChainManager
()
.
Genesis
()
.
Hash
(),
})
...
...
xeth/hexface.go
浏览文件 @
2d09e677
...
...
@@ -29,7 +29,7 @@ func (self *JSXEth) BlockByHash(strHash string) *JSBlock {
func
(
self
*
JSXEth
)
BlockByNumber
(
num
int32
)
*
JSBlock
{
if
num
==
-
1
{
return
NewJSBlock
(
self
.
obj
.
ChainManager
()
.
CurrentBlock
)
return
NewJSBlock
(
self
.
obj
.
ChainManager
()
.
CurrentBlock
()
)
}
return
NewJSBlock
(
self
.
obj
.
ChainManager
()
.
GetBlockByNumber
(
uint64
(
num
)))
...
...
xeth/pipe.go
浏览文件 @
2d09e677
...
...
@@ -82,7 +82,7 @@ func (self *XEth) Execute(addr []byte, data []byte, value, gas, price *ethutil.V
func
(
self
*
XEth
)
ExecuteObject
(
object
*
Object
,
data
[]
byte
,
value
,
gas
,
price
*
ethutil
.
Value
)
([]
byte
,
error
)
{
var
(
initiator
=
state
.
NewStateObject
(
self
.
obj
.
KeyManager
()
.
KeyPair
()
.
Address
())
block
=
self
.
chainManager
.
CurrentBlock
block
=
self
.
chainManager
.
CurrentBlock
()
)
self
.
Vm
.
State
=
self
.
World
()
.
State
()
.
Copy
()
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录