Skip to content

Commit

Permalink
clean
Browse files Browse the repository at this point in the history
  • Loading branch information
cc14514 committed Dec 26, 2018
1 parent 49e99fa commit 12b7470
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 14 deletions.
12 changes: 0 additions & 12 deletions consensus/tribe/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -373,18 +373,6 @@ func (self *TribeStatus) ValidateBlock(parent, block *types.Block, validateSigne
return nil
}

//TODO : ****** 这个地方是临时解决方案,后续需要做很大调整
//TODO : ****** 这个地方是临时解决方案,后续需要做很大调整
//如果 header.parent != currentBlockNumber , 则等一下,让 blockBody 追赶 header
//cn := chain.CurrentHeader().Number.Uint64()
//for cn < number-1 {
//for cn < number-1 && chain.CurrentHeader().Hash() != header.ParentHash {
/*
fmt.Println(cn, "--------------------------->")
fmt.Println(cn, "=1=> currentNum:", chain.CurrentHeader().Number.Int64(), "currentHash:", chain.CurrentHeader().Hash().Hex())
fmt.Println(cn, "=2=> parentNum:", parent.Number.Int64(), "parentHash:", parent.Hash().Hex())
fmt.Println(cn, "=3=> headerNum", header.Number.Int64(), "header.parentHex", header.ParentHash.Hex())
*/
header := block.Header()
number := header.Number.Int64()

Expand Down
4 changes: 2 additions & 2 deletions consensus/tribe/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ var (
blockPeriod = uint64(15) // Default minimum difference between two consecutive block's timestamps
extraVanity = 32 // Fixed number of extra-data prefix bytes reserved for signer vanity
extraSeal = 65 // Fixed number of extra-data suffix bytes reserved for signer seal
nonceSync = hexutil.MustDecode("0xffffffffffffffff") // Magic nonce number to vote on adding a new signer
nonceAsync = hexutil.MustDecode("0x0000000000000000") // Magic nonce number to vote on removing a signer.
nonceSync = hexutil.MustDecode("0xffffffffffffffff") // TODO Reserved to control behavior
nonceAsync = hexutil.MustDecode("0x0000000000000000") // TODO Reserved to control behavior
uncleHash = types.CalcUncleHash(nil) // Always Keccak256(RLP([])) as uncles are meaningless outside of PoW.
diffInTurnMain = big.NewInt(3) // Block difficulty for in-turn Main
diffInTurn = big.NewInt(2) // Block difficulty for in-turn Sub
Expand Down

0 comments on commit 12b7470

Please sign in to comment.