• R/O
  • HTTP
  • SSH
  • HTTPS

vapor: 提交

Golang implemented sidechain for Bytom


Commit MetaInfo

修订版c480f7aa2f0661a580be5add6d93388fa1450ad2 (tree)
时间2019-11-27 17:17:37
作者shenao78 <shenao.78@163....>
Commitershenao78

Log Message

force block

更改概述

差异

--- a/protocol/bbft.go
+++ b/protocol/bbft.go
@@ -30,32 +30,6 @@ func signCacheKey(blockHash, pubkey string) string {
3030 }
3131
3232 func (c *Chain) checkDoubleSign(bh *types.BlockHeader, xPub string) error {
33- blockHashes, err := c.store.GetBlockHashesByHeight(bh.Height)
34- if err != nil {
35- return err
36- }
37-
38- for _, blockHash := range blockHashes {
39- if *blockHash == bh.Hash() {
40- continue
41- }
42-
43- blockHeader, err := c.store.GetBlockHeader(blockHash)
44- if err != nil {
45- return err
46- }
47-
48- consensusNode, err := c.getConsensusNode(&blockHeader.PreviousBlockHash, xPub)
49- if err == errNotFoundConsensusNode {
50- continue
51- } else if err != nil {
52- return err
53- }
54-
55- if blockHeader.BlockWitness.Get(consensusNode.Order) != nil {
56- return errDoubleSignBlock
57- }
58- }
5933 return nil
6034 }
6135
Show on old repository browser