aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/block.go
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2018-07-20 09:52:52 +0800
committermissionliao <38416648+missionliao@users.noreply.github.com>2018-07-20 09:52:52 +0800
commitdfa19fc2b4e38097334f4a30e159f9bcd92909c0 (patch)
tree718524746a0871a07a4a68dea43481e6ac841b39 /core/types/block.go
parent46a84bff9ac419853550f7c17b13fb8633e507c9 (diff)
downloadtangerine-consensus-dfa19fc2b4e38097334f4a30e159f9bcd92909c0.tar
tangerine-consensus-dfa19fc2b4e38097334f4a30e159f9bcd92909c0.tar.gz
tangerine-consensus-dfa19fc2b4e38097334f4a30e159f9bcd92909c0.tar.bz2
tangerine-consensus-dfa19fc2b4e38097334f4a30e159f9bcd92909c0.tar.lz
tangerine-consensus-dfa19fc2b4e38097334f4a30e159f9bcd92909c0.tar.xz
tangerine-consensus-dfa19fc2b4e38097334f4a30e159f9bcd92909c0.tar.zst
tangerine-consensus-dfa19fc2b4e38097334f4a30e159f9bcd92909c0.zip
Implement simulation on a real network (#5)
simulation: implement simulation on a real network
Diffstat (limited to 'core/types/block.go')
-rw-r--r--core/types/block.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/types/block.go b/core/types/block.go
index 91b71da..6762f14 100644
--- a/core/types/block.go
+++ b/core/types/block.go
@@ -38,15 +38,15 @@ const (
// Block represents a single event broadcasted on the network.
type Block struct {
- ProposerID ValidatorID
- ParentHash common.Hash
- Hash common.Hash
- Height uint64
- Timestamps map[ValidatorID]time.Time
- Acks map[common.Hash]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"`
- Ackeds map[common.Hash]struct{}
- State State
+ Ackeds map[common.Hash]struct{} `json:"-"`
+ State State `json:"-"`
}
func (b *Block) String() string {