mirror of
https://github.com/QuilibriumNetwork/ceremonyclient.git
synced 2026-02-21 18:37:26 +08:00
import types/tries package only once
This commit is contained in:
parent
4c021b988c
commit
522f95cb21
@ -31,7 +31,6 @@ import (
|
||||
"source.quilibrium.com/quilibrium/monorepo/protobufs"
|
||||
application "source.quilibrium.com/quilibrium/monorepo/types/hypergraph"
|
||||
"source.quilibrium.com/quilibrium/monorepo/types/tries"
|
||||
crypto "source.quilibrium.com/quilibrium/monorepo/types/tries"
|
||||
"source.quilibrium.com/quilibrium/monorepo/verenc"
|
||||
)
|
||||
|
||||
@ -59,7 +58,7 @@ func TestHypergraphSyncServer(t *testing.T) {
|
||||
data1 := enc.Encrypt(make([]byte, 20), pub)
|
||||
verenc1 := data1[0].Compress()
|
||||
vertices1 := make([]application.Vertex, numOperations)
|
||||
dataTree1 := &crypto.VectorCommitmentTree{}
|
||||
dataTree1 := &tries.VectorCommitmentTree{}
|
||||
logger, _ := zap.NewDevelopment()
|
||||
inclusionProver := bls48581.NewKZGInclusionProver(logger)
|
||||
for _, d := range []application.Encrypted{verenc1} {
|
||||
@ -273,7 +272,7 @@ func TestHypergraphSyncServer(t *testing.T) {
|
||||
}
|
||||
time.Sleep(10 * time.Second)
|
||||
str.CloseSend()
|
||||
leaves := crypto.CompareLeaves(
|
||||
leaves := tries.CompareLeaves(
|
||||
crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(),
|
||||
crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(),
|
||||
)
|
||||
@ -298,7 +297,7 @@ func TestHypergraphSyncServer(t *testing.T) {
|
||||
crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree().Commit(false),
|
||||
crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree().Commit(false),
|
||||
) {
|
||||
leaves := crypto.CompareLeaves(
|
||||
leaves := tries.CompareLeaves(
|
||||
crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(),
|
||||
crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(),
|
||||
)
|
||||
@ -331,7 +330,7 @@ func TestHypergraphPartialSync(t *testing.T) {
|
||||
data1 := enc.Encrypt(make([]byte, 20), pub)
|
||||
verenc1 := data1[0].Compress()
|
||||
vertices1 := make([]application.Vertex, numOperations)
|
||||
dataTree1 := &crypto.VectorCommitmentTree{}
|
||||
dataTree1 := &tries.VectorCommitmentTree{}
|
||||
logger, _ := zap.NewDevelopment()
|
||||
inclusionProver := bls48581.NewKZGInclusionProver(logger)
|
||||
domain := make([]byte, 32)
|
||||
@ -628,7 +627,7 @@ func TestHypergraphPartialSync(t *testing.T) {
|
||||
log.Fatalf("Client: failed to sync 1: %v", err)
|
||||
}
|
||||
str.CloseSend()
|
||||
leaves := crypto.CompareLeaves(
|
||||
leaves := tries.CompareLeaves(
|
||||
crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(),
|
||||
crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(),
|
||||
)
|
||||
@ -751,7 +750,7 @@ func TestHypergraphPartialSync(t *testing.T) {
|
||||
crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree().Commit(false),
|
||||
crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree().Commit(false),
|
||||
) {
|
||||
leaves := crypto.CompareLeaves(
|
||||
leaves := tries.CompareLeaves(
|
||||
crdts[0].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(),
|
||||
crdts[1].(*hgcrdt.HypergraphCRDT).GetVertexAddsSet(shardKey).GetTree(),
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user