OSDN Git Service
(root)
/
bytom
/
vapor.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
52a8ad6
)
add block hash
author
mars
<mars@bytom.io>
Mon, 22 Jul 2019 10:39:12 +0000
(18:39 +0800)
committer
mars
<mars@bytom.io>
Mon, 22 Jul 2019 10:39:12 +0000
(18:39 +0800)
toolbar/reward/service/node.go
patch
|
blob
|
history
diff --git
a/toolbar/reward/service/node.go
b/toolbar/reward/service/node.go
index
1142f7c
..
af7309a
100644
(file)
--- a/
toolbar/reward/service/node.go
+++ b/
toolbar/reward/service/node.go
@@
-19,6
+19,10
@@
func NewNode(hostPort string) *Node {
return &Node{hostPort: hostPort}
}
+func (n *Node) GetBlockByHash(hash string) (*types.Block, error) {
+ return n.getRawBlock(&getRawBlockReq{BlockHash: hash})
+}
+
func (n *Node) GetBlockByHeight(height uint64) (*types.Block, error) {
return n.getRawBlock(&getRawBlockReq{BlockHeight: height})
}