consensus check is forked

pull/4509/head
frozen 2 years ago committed by Casey Gardiner
parent 7dd6e46c8b
commit d1b3a5ba9f
  1. 6
      api/service/explorer/service.go
  2. 2
      consensus/consensus.go

@ -223,9 +223,9 @@ func (s *Service) GetBlocks(w http.ResponseWriter, r *http.Request) {
for i := cur; i > 0; i-- {
block := s.blockchain.GetBlockByNumber(i)
w.Write([]byte(fmt.Sprintf("%d ", i)))
w.Write([]byte(fmt.Sprintf("%s ", block.Header().ViewID().String())))
w.Write([]byte(fmt.Sprintf("%s ", block.Header().Coinbase().Hash().Hex())))
w.Write([]byte(fmt.Sprintf("#%d ", i)))
w.Write([]byte(fmt.Sprintf("v%s ", block.Header().ViewID().String())))
w.Write([]byte(fmt.Sprintf("e%d ", block.Header().Epoch().Uint64())))
w.Write([]byte(fmt.Sprintf("%s\n", block.Header().Coinbase().Hex())))
}
}

@ -71,8 +71,6 @@ type Consensus struct {
priKey multibls.PrivateKeys
// the publickey of leader
LeaderPubKey *bls.PublicKeyWrapper
// index of leader in the list of validators.
LeaderIndex int
// blockNum: the next blockNumber that FBFT is going to agree on,
// should be equal to the blockNumber of next block
blockNum uint64

Loading…
Cancel
Save