aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/dexon-consensus/core/types
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-01-24 15:05:24 +0800
committerWei-Ning Huang <w@byzantine-lab.io>2019-06-12 17:27:21 +0800
commitf55616df4fb5de81f25997feefd52d0554f985c6 (patch)
treeb2fb44ab914f6b05a901690a90adb385c0cd26fb /vendor/github.com/dexon-foundation/dexon-consensus/core/types
parent3c774363f4df8cad3e8aafa594c5f2b417b7330e (diff)
downloadgo-tangerine-f55616df4fb5de81f25997feefd52d0554f985c6.tar.gz
go-tangerine-f55616df4fb5de81f25997feefd52d0554f985c6.tar.zst
go-tangerine-f55616df4fb5de81f25997feefd52d0554f985c6.zip
consensus: dexcon: snapshot round height when finalizing block (#170)
Instead of having BP to send a tx to register the round height, just modify the state when finalizing block.
Diffstat (limited to 'vendor/github.com/dexon-foundation/dexon-consensus/core/types')
-rw-r--r--vendor/github.com/dexon-foundation/dexon-consensus/core/types/vote.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/vote.go b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/vote.go
index ae86e51cc..46ea1dfb0 100644
--- a/vendor/github.com/dexon-foundation/dexon-consensus/core/types/vote.go
+++ b/vendor/github.com/dexon-foundation/dexon-consensus/core/types/vote.go
@@ -38,6 +38,18 @@ const (
MaxVoteType
)
+// NullBlockHash is the blockHash for ⊥ value.
+var NullBlockHash common.Hash
+
+// SkipBlockHash is the blockHash for SKIP value.
+var SkipBlockHash common.Hash
+
+func init() {
+ for idx := range SkipBlockHash {
+ SkipBlockHash[idx] = 0xff
+ }
+}
+
// VoteHeader is the header for vote, which can be used as map keys.
type VoteHeader struct {
ProposerID NodeID `json:"proposer_id"`