aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/utils.go
diff options
context:
space:
mode:
authorMission Liao <mission.liao@dexon.org>2018-11-11 13:13:40 +0800
committerGitHub <noreply@github.com>2018-11-11 13:13:40 +0800
commit795b8b5309ed94858f3bd56e42093d65dcdd0870 (patch)
tree3618a5afe6fb3b486614bd164071b2c02eed18c8 /core/test/utils.go
parent81372e5746fedf0ad691ab628096b7caefbe3008 (diff)
downloaddexon-consensus-795b8b5309ed94858f3bd56e42093d65dcdd0870.tar
dexon-consensus-795b8b5309ed94858f3bd56e42093d65dcdd0870.tar.gz
dexon-consensus-795b8b5309ed94858f3bd56e42093d65dcdd0870.tar.bz2
dexon-consensus-795b8b5309ed94858f3bd56e42093d65dcdd0870.tar.lz
dexon-consensus-795b8b5309ed94858f3bd56e42093d65dcdd0870.tar.xz
dexon-consensus-795b8b5309ed94858f3bd56e42093d65dcdd0870.tar.zst
dexon-consensus-795b8b5309ed94858f3bd56e42093d65dcdd0870.zip
test: add integration test (#315)
* Rename NonByzantineTestSuite to WithSchedulerTestsuite * Add a method to query the latest position delivered * Add integration test for core.Consensus * Show detailed list for test cases in CI
Diffstat (limited to 'core/test/utils.go')
-rw-r--r--core/test/utils.go13
1 files changed, 13 insertions, 0 deletions
diff --git a/core/test/utils.go b/core/test/utils.go
index f5f4c36..56c5eac 100644
--- a/core/test/utils.go
+++ b/core/test/utils.go
@@ -157,3 +157,16 @@ func cloneDKGFinalize(final *typesDKG.Finalize) (
}
return
}
+
+func cloneBlockRandomnessResult(rand *types.BlockRandomnessResult) (
+ copied *types.BlockRandomnessResult) {
+ b, err := rlp.EncodeToBytes(rand)
+ if err != nil {
+ panic(err)
+ }
+ copied = &types.BlockRandomnessResult{}
+ if err = rlp.DecodeBytes(b, copied); err != nil {
+ panic(err)
+ }
+ return
+}