aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/block.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-08-03 09:42:58 +0800
committerGitHub <noreply@github.com>2018-08-03 09:42:58 +0800
commit6c4617f42f31014727bdc6f5731c32fc21004101 (patch)
treedd62c88c83ce1c831826126fbf4e63cb4388fdde /core/types/block.go
parent819030245cf4114429f8d8cdd32488a15a8666ee (diff)
downloadtangerine-consensus-6c4617f42f31014727bdc6f5731c32fc21004101.tar
tangerine-consensus-6c4617f42f31014727bdc6f5731c32fc21004101.tar.gz
tangerine-consensus-6c4617f42f31014727bdc6f5731c32fc21004101.tar.bz2
tangerine-consensus-6c4617f42f31014727bdc6f5731c32fc21004101.tar.lz
tangerine-consensus-6c4617f42f31014727bdc6f5731c32fc21004101.tar.xz
tangerine-consensus-6c4617f42f31014727bdc6f5731c32fc21004101.tar.zst
tangerine-consensus-6c4617f42f31014727bdc6f5731c32fc21004101.zip
core: DEXON Consensus Timestamp Algorithm. (#29)
Diffstat (limited to 'core/types/block.go')
-rw-r--r--core/types/block.go22
1 files changed, 12 insertions, 10 deletions
diff --git a/core/types/block.go b/core/types/block.go
index c445fd2..56b456c 100644
--- a/core/types/block.go
+++ b/core/types/block.go
@@ -2,16 +2,16 @@
// This file is part of the dexon-consensus-core library.
//
// The dexon-consensus-core library is free software: you can redistribute it
-// and/or modify it under the terms of the GNU Lesser General Pubic License as
-// pubished by the Free Software Foundation, either version 3 of the License,
+// and/or modify it under the terms of the GNU Lesser General Public License as
+// published by the Free Software Foundation, either version 3 of the License,
// or (at your option) any later version.
//
// The dexon-consensus-core library is distributed in the hope that it will be
// useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser
-// General Pubic License for more details.
+// General Public License for more details.
//
-// You should have received a copy of the GNU Lesser General Pubic License
+// You should have received a copy of the GNU Lesser General Public License
// along with the dexon-consensus-core library. If not, see
// <http://www.gnu.org/licenses/>.
@@ -38,12 +38,14 @@ const (
// Block represents a single event broadcasted on the network.
type Block struct {
- ProposerID ValidatorID `json:"proposer_id"`
- ParentHash common.Hash `json:"parent_hash"`
- Hash common.Hash `json:"hash"`
- Height uint64 `json:"height"`
- Timestamps map[ValidatorID]time.Time `json:"timestamps"`
- Acks map[common.Hash]struct{} `json:"acks"`
+ ProposerID ValidatorID `json:"proposer_id"`
+ ParentHash common.Hash `json:"parent_hash"`
+ Hash common.Hash `json:"hash"`
+ Height uint64 `json:"height"`
+ Timestamps map[ValidatorID]time.Time `json:"timestamps"`
+ Acks map[common.Hash]struct{} `json:"acks"`
+ ConsensusTime time.Time `json:"consensus_time"`
+ ConsensusHeight uint64 `json:"consensus_height"`
Ackeds map[common.Hash]struct{} `json:"-"`
AckedValidators map[ValidatorID]struct{} `json:"-"`