diff options
author | Mission Liao <mission.liao@dexon.org> | 2018-08-03 13:57:41 +0800 |
---|---|---|
committer | Wei-Ning Huang <aitjcize@gmail.com> | 2018-08-03 13:57:41 +0800 |
commit | 101ce1072667a1a8cfeaa58dc862eb4d0dbec6f7 (patch) | |
tree | 5e4a57f708d64450d1049c791d7786570a3aa24e /blockdb | |
parent | 6c4617f42f31014727bdc6f5731c32fc21004101 (diff) | |
download | tangerine-consensus-101ce1072667a1a8cfeaa58dc862eb4d0dbec6f7.tar tangerine-consensus-101ce1072667a1a8cfeaa58dc862eb4d0dbec6f7.tar.gz tangerine-consensus-101ce1072667a1a8cfeaa58dc862eb4d0dbec6f7.tar.bz2 tangerine-consensus-101ce1072667a1a8cfeaa58dc862eb4d0dbec6f7.tar.lz tangerine-consensus-101ce1072667a1a8cfeaa58dc862eb4d0dbec6f7.tar.xz tangerine-consensus-101ce1072667a1a8cfeaa58dc862eb4d0dbec6f7.tar.zst tangerine-consensus-101ce1072667a1a8cfeaa58dc862eb4d0dbec6f7.zip |
test: random blocks generator (#26)
* Add blocks generator.
This helper would randomly generate blocks that forms valid DAGs.
* Add revealer
Revealer is an extension of blockdb.BlockIterator. The block
sequence from 'Next' method would be either randomly (see
RandomRevealer) or meeting some specific condition (ex. forming
a DAG, see RandomDAGRevealer).
* Add test for sequencer based on random blocks.
* core: refine Application interface and add Governance interface (#24)
Add a new Governance interface for interaction with the governance contract.
Also remove the ValidateBlock call in application interface as the application should validate it before putting it into the consensus module.
A new BlockConverter interface is also added. The consensus module should accept the BlockConverter interface in future implementation, and use the Block() function to get the underlying block info.
Diffstat (limited to 'blockdb')
-rw-r--r-- | blockdb/memory_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/blockdb/memory_test.go b/blockdb/memory_test.go index 7d78f81..9394c26 100644 --- a/blockdb/memory_test.go +++ b/blockdb/memory_test.go @@ -1,3 +1,20 @@ +// 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 blockdb import ( |