OSDN Git Service

edit code while reviewing the code (#255)
[bytom/vapor.git] / proposal / blockproposer / blockproposer.go
index 32105db..0b568cf 100644 (file)
@@ -64,13 +64,13 @@ func (b *BlockProposer) generateBlocks() {
                        nextBlockTime += consensus.BlockTimeInterval
                }
 
-               isBlocker, err := b.chain.IsBlocker(&bestBlockHash, xpubStr, nextBlockTime)
+               blocker, err := b.chain.GetBlocker(&bestBlockHash, nextBlockTime)
                if err != nil {
                        log.WithFields(log.Fields{"module": logModule, "error": err, "pubKey": xpubStr}).Error("fail on check is next blocker")
                        continue
                }
 
-               if !isBlocker {
+               if xpubStr != blocker {
                        continue
                }