aboutsummaryrefslogtreecommitdiffstats
path: root/core/types/block-randomness.go
diff options
context:
space:
mode:
authorJimmy Hu <jimmy.hu@dexon.org>2018-10-05 22:10:55 +0800
committerGitHub <noreply@github.com>2018-10-05 22:10:55 +0800
commitb74b8c092dcc10a7792d92c64c6dc22d94edb295 (patch)
tree25d249774f2e116c357674693dd4633c11c55582 /core/types/block-randomness.go
parenta23f81165db3071131ef67e70a54bbc78b8a0af1 (diff)
downloaddexon-consensus-b74b8c092dcc10a7792d92c64c6dc22d94edb295.tar
dexon-consensus-b74b8c092dcc10a7792d92c64c6dc22d94edb295.tar.gz
dexon-consensus-b74b8c092dcc10a7792d92c64c6dc22d94edb295.tar.bz2
dexon-consensus-b74b8c092dcc10a7792d92c64c6dc22d94edb295.tar.lz
dexon-consensus-b74b8c092dcc10a7792d92c64c6dc22d94edb295.tar.xz
dexon-consensus-b74b8c092dcc10a7792d92c64c6dc22d94edb295.tar.zst
dexon-consensus-b74b8c092dcc10a7792d92c64c6dc22d94edb295.zip
core: General tsig (#177)
Diffstat (limited to 'core/types/block-randomness.go')
-rw-r--r--core/types/block-randomness.go37
1 files changed, 37 insertions, 0 deletions
diff --git a/core/types/block-randomness.go b/core/types/block-randomness.go
new file mode 100644
index 0000000..896904a
--- /dev/null
+++ b/core/types/block-randomness.go
@@ -0,0 +1,37 @@
+// Copyright 2018 The dexon-consensus-core Authors
+// 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 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 Public License for more details.
+//
+// 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/>.
+
+package types
+
+import (
+ "github.com/dexon-foundation/dexon-consensus-core/common"
+)
+
+// AgreementResult describes an agremeent result.
+type AgreementResult struct {
+ BlockHash common.Hash `json:"block_hash"`
+ Round uint64 `json:"round"`
+ Position Position `json:"position"`
+ Votes []Vote `json:"votes"`
+}
+
+// BlockRandomnessResult describes a block randomness result
+type BlockRandomnessResult struct {
+ BlockHash common.Hash `json:"block_hash"`
+ Round uint64 `json:"round"`
+ Randomness []byte `json:"randomness"`
+}