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:
0e82a13
)
try fix bug (#457)
author
Paladz
<yzhu101@uottawa.ca>
Wed, 27 Nov 2019 11:07:29 +0000
(19:07 +0800)
committer
GitHub
<noreply@github.com>
Wed, 27 Nov 2019 11:07:29 +0000
(19:07 +0800)
protocol/block.go
patch
|
blob
|
history
diff --git
a/protocol/block.go
b/protocol/block.go
index
3b08fbd
..
a4e167f
100644
(file)
--- a/
protocol/block.go
+++ b/
protocol/block.go
@@
-20,7
+20,7
@@
var (
// BlockExist check is a block in chain or orphan
func (c *Chain) BlockExist(hash *bc.Hash) bool {
- if
_, err := c.store.GetBlockHeader(hash); err == nil
{
+ if
bh, err := c.store.GetBlockHeader(hash); err == nil && bh.Height <= c.BestBlockHeight()
{
return true
}
return c.orphanManage.BlockExist(hash)