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:
71ca1e5
)
update
author
Chengcheng Zhang
<943420582@qq.com>
Wed, 5 Jun 2019 02:38:21 +0000
(10:38 +0800)
committer
Chengcheng Zhang
<943420582@qq.com>
Wed, 5 Jun 2019 02:38:21 +0000
(10:38 +0800)
proposal/blockproposer/blockproposer.go
patch
|
blob
|
history
diff --git
a/proposal/blockproposer/blockproposer.go
b/proposal/blockproposer/blockproposer.go
index
caa8b2b
..
96c78bb
100644
(file)
--- a/
proposal/blockproposer/blockproposer.go
+++ b/
proposal/blockproposer/blockproposer.go
@@
-58,7
+58,7
@@
func (b *BlockProposer) generateBlocks() {
if now < bestBlockHeader.Timestamp {
base = bestBlockHeader.Timestamp
}
- minTimeToNextBlock := consensus.BlockTimeInterval -
now
%consensus.BlockTimeInterval
+ minTimeToNextBlock := consensus.BlockTimeInterval -
base
%consensus.BlockTimeInterval
nextBlockTime := base + minTimeToNextBlock
if (nextBlockTime - now) < consensus.BlockTimeInterval/10 {
nextBlockTime += consensus.BlockTimeInterval