OSDN Git Service
(root)
/
bytom
/
bytom.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c72d0e
)
add checkProofOfWork
author
jeason
<jeason_ustc@.com>
Tue, 1 Aug 2017 08:28:09 +0000
(
01:28
-0700)
committer
jeason
<jeason_ustc@.com>
Tue, 1 Aug 2017 08:28:09 +0000
(
01:28
-0700)
rpc/core/generate.go
patch
|
blob
|
history
diff --git
a/rpc/core/generate.go
b/rpc/core/generate.go
index
2579e23
..
66c11bf
100644
(file)
--- a/
rpc/core/generate.go
+++ b/
rpc/core/generate.go
@@
-66,9
+66,9
@@
func solveBlock(header *wire.BlockHeader, targetDifficulty *big.Int) bool {
}
func checkProofOfWork(header *wire.BlockHeader, targetDifficulty *big.Int) bool {
- hash := h
d
r.BlockHash()
+ hash := h
eade
r.BlockHash()
if wire.HashToBig(&hash).Cmp(targetDifficulty) <= 0 {
return true
}
+ return false
}
-