elkrem: remove logging statements from tests
This commit removes the logging statements within the elkrem tests as they become rather spammy when executing on the continuous integration server.
This commit is contained in:
parent
bdc22e67fa
commit
09219917a0
@ -8,64 +8,50 @@ import (
|
|||||||
|
|
||||||
// TestElkremBig tries 10K hashes
|
// TestElkremBig tries 10K hashes
|
||||||
func TestElkremBig(t *testing.T) {
|
func TestElkremBig(t *testing.T) {
|
||||||
sndr := NewElkremSender(wire.DoubleSha256SH([]byte("elktest")))
|
|
||||||
var rcv ElkremReceiver
|
var rcv ElkremReceiver
|
||||||
// SenderSerdesTest(t, sndr)
|
|
||||||
|
sndr := NewElkremSender(wire.DoubleSha256SH([]byte("elktest")))
|
||||||
|
|
||||||
for n := uint64(0); n < 10000; n++ {
|
for n := uint64(0); n < 10000; n++ {
|
||||||
sha, err := sndr.AtIndex(n)
|
sha, err := sndr.AtIndex(n)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
err = rcv.AddNext(sha)
|
|
||||||
if err != nil {
|
if err = rcv.AddNext(sha); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if n%1000 == 999 {
|
|
||||||
t.Logf("stack with %d received hashes\n", n+1)
|
|
||||||
for i, n := range rcv.s {
|
|
||||||
t.Logf("Stack element %d: index %d height %d %s\n",
|
|
||||||
i, n.i, n.h, n.sha.String())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// SenderSerdesTest(t, sndr)
|
|
||||||
ReceiverSerdesTest(t, &rcv)
|
ReceiverSerdesTest(t, &rcv)
|
||||||
|
|
||||||
for n := uint64(0); n < 10000; n += 500 {
|
for n := uint64(0); n < 10000; n += 500 {
|
||||||
sha, err := rcv.AtIndex(n)
|
if _, err := rcv.AtIndex(n); err != nil {
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
t.Logf("Retreived index %d %s\n", n, sha.String())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TestElkremLess tries 10K hashes
|
// TestElkremLess tries 10K hashes
|
||||||
func TestElkremLess(t *testing.T) {
|
func TestElkremLess(t *testing.T) {
|
||||||
sndr := NewElkremSender(wire.DoubleSha256SH([]byte("elktest2")))
|
|
||||||
var rcv ElkremReceiver
|
var rcv ElkremReceiver
|
||||||
|
|
||||||
|
sndr := NewElkremSender(wire.DoubleSha256SH([]byte("elktest2")))
|
||||||
|
|
||||||
for n := uint64(0); n < 5000; n++ {
|
for n := uint64(0); n < 5000; n++ {
|
||||||
sha, err := sndr.AtIndex(n)
|
sha, err := sndr.AtIndex(n)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
err = rcv.AddNext(sha)
|
|
||||||
if err != nil {
|
if err = rcv.AddNext(sha); err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
if n%1000 == 999 {
|
|
||||||
t.Logf("stack with %d received hashes\n", n+1)
|
|
||||||
for i, n := range rcv.s {
|
|
||||||
t.Logf("Stack element %d: index %d height %d %s\n",
|
|
||||||
i, n.i, n.h, n.sha.String())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for n := uint64(0); n < 5000; n += 500 {
|
for n := uint64(0); n < 5000; n += 500 {
|
||||||
sha, err := rcv.AtIndex(n)
|
if _, err := rcv.AtIndex(n); err != nil {
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
t.Logf("Retreived index %d %s\n",
|
|
||||||
n, sha.String())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user