testing

package
v0.0.0-...-6e15c72 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 31, 2013 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package testing provides some unit-testing support functions.

Index

Constants

This section is empty.

Variables

View Source
var PtreeSplits15k = []*Zp{}/* 15000 elements not displayed */
View Source
var PtreeSplits85 = []*Zp{
	Zs(P_SKS, "54945054303302140323349777569652159744"),
	Zs(P_SKS, "301824390735659941098168552847110967299"),
	Zs(P_SKS, "244727299682701342167768131406454086662"),
	Zs(P_SKS, "246090505779456321483693264299682785547"),
	Zs(P_SKS, "132666079786438034357736690869858972940"),
	Zs(P_SKS, "77943753696469936247570506393661277454"),
	Zs(P_SKS, "23196332603806579862361573649796228117"),
	Zs(P_SKS, "4716213446676942567518507102644048922"),
	Zs(P_SKS, "296958268935570641352142910860288566305"),
	Zs(P_SKS, "68302849918166164850536779468406147620"),
	Zs(P_SKS, "218289647857890898753469351137063165732"),
	Zs(P_SKS, "49493891938832871357367248144831830823"),
	Zs(P_SKS, "48291393928127338850139259452183259432"),
	Zs(P_SKS, "86222875303132381523404440898289042729"),
	Zs(P_SKS, "141808492182097342190378424004993438762"),
	Zs(P_SKS, "335945044879925574404988722388729177130"),
	Zs(P_SKS, "236652262168326400305360829310456888110"),
	Zs(P_SKS, "251126436454877830379605469450395348293"),
	Zs(P_SKS, "326459174278123784017559830530989911369"),
	Zs(P_SKS, "33880488004771349616788442031172397900"),
	Zs(P_SKS, "52260317194205405422862037231440764495"),
	Zs(P_SKS, "111966997212661832286471884984785895763"),
	Zs(P_SKS, "65346596413500442902105433236945513815"),
	Zs(P_SKS, "336173260736631828030752156996804317528"),
	Zs(P_SKS, "12549734565921827638994232318473088346"),
	Zs(P_SKS, "236987695883303042196824159729755015004"),
	Zs(P_SKS, "323119199726242591092367701897211489888"),
	Zs(P_SKS, "41584217555254899291679977414635303265"),
	Zs(P_SKS, "118348940079828526226895879854757946209"),
	Zs(P_SKS, "76747152908027187555920496063053721192"),
	Zs(P_SKS, "141520615381718155000336085124075411305"),
	Zs(P_SKS, "12644319991398156892717186701440448617"),
	Zs(P_SKS, "6412217881018912834671730377842624107"),
	Zs(P_SKS, "40272626613761839643433023788839454318"),
	Zs(P_SKS, "317014674893435005836306380764370532983"),
	Zs(P_SKS, "311101531782501702629491213596113502586"),
	Zs(P_SKS, "188716858420292079269415903308294938757"),
	Zs(P_SKS, "59683129049585326195019115368974177413"),
	Zs(P_SKS, "120554134733908208956936621136810387334"),
	Zs(P_SKS, "118284951518112845084965537305254483334"),
	Zs(P_SKS, "334377276241926936152366343232870849927"),
	Zs(P_SKS, "77310576102193849850198786368460166024"),
	Zs(P_SKS, "48414329405458959169482475701469749386"),
	Zs(P_SKS, "250015874231309260492838193181798330515"),
	Zs(P_SKS, "159774163460744271274851987570681581206"),
	Zs(P_SKS, "143198666233767249362774217511755743896"),
	Zs(P_SKS, "240912385064508366145523910482350846106"),
	Zs(P_SKS, "137051103418540437753971021562365500061"),
	Zs(P_SKS, "327716597715155576166988551942487950757"),
	Zs(P_SKS, "183616583934478418670273555233235445158"),
	Zs(P_SKS, "205743196898220792903183384302974895272"),
	Zs(P_SKS, "186204001228737102171059261656423711656"),
	Zs(P_SKS, "252570316860507925711101109364354724777"),
	Zs(P_SKS, "244999449118738179307733396365253793195"),
	Zs(P_SKS, "8050877573458140058716086496555437487"),
	Zs(P_SKS, "53287660286265266199637380204079727539"),
	Zs(P_SKS, "20018245473587526137270198427261386422"),
	Zs(P_SKS, "171075676243784157336190498877480108992"),
	Zs(P_SKS, "325970951673190825762721854817698148039"),
	Zs(P_SKS, "248360922124393115642405238390171529928"),
	Zs(P_SKS, "285728769080344321852508208337475846600"),
	Zs(P_SKS, "142870176296995226271711928223105046985"),
	Zs(P_SKS, "46264038433717262828185678231991802569"),
	Zs(P_SKS, "259502011074668048058351875079612836042"),
	Zs(P_SKS, "38755373377015903993868338342907167182"),
	Zs(P_SKS, "211463311137941721160830773248262076623"),
	Zs(P_SKS, "220668689716423815468107223827565625040"),
	Zs(P_SKS, "278495691295316092131115910823992635857"),
	Zs(P_SKS, "290108658999174932224227283677350406611"),
	Zs(P_SKS, "49288527855085557669219340700286100693"),
	Zs(P_SKS, "208585055893782380269169696681176208600"),
	Zs(P_SKS, "175869353869268402931895766549932311261"),
	Zs(P_SKS, "52452224898726559179038736954156221661"),
	Zs(P_SKS, "106012643650337984639895849375969307870"),
	Zs(P_SKS, "105919911020868424250639020684116302309"),
	Zs(P_SKS, "105424832931958607019255672786388535013"),
	Zs(P_SKS, "43048960869965803184334424644920615143"),
	Zs(P_SKS, "332850420638398765868853355107487298026"),
	Zs(P_SKS, "274284651981540161475649614117607611627"),
	Zs(P_SKS, "305496626634797764740487407455046400238"),
	Zs(P_SKS, "104161670190828326738629254941040826870"),
	Zs(P_SKS, "233126962571760965470316713449937861113"),
	Zs(P_SKS, "128034845779765006459409039712734820092"),
	Zs(P_SKS, "29360578736782464072123892399520131324"),
	Zs(P_SKS, "32934118080763265448914909383880829695"),
}

Functions

func LookupNode

func LookupNode(key string, start PrefixNode) (PrefixNode, error)

func RunFullSync

func RunFullSync(t *testing.T, peerMgr PeerManager)

Test full node sync.

func RunOneSided

func RunOneSided(t *testing.T, peerMgr PeerManager, clientHas bool, n int, nsecs int)

Test a one-sided sync

func RunPolySyncLowMBar

func RunPolySyncLowMBar(t *testing.T, peerMgr PeerManager)

Test sync with polynomial interpolation.

func RunPolySyncMBar

func RunPolySyncMBar(t *testing.T, peerMgr PeerManager)

Test sync with polynomial interpolation.

func RunSplits15k

func RunSplits15k(t *testing.T, peerMgr PeerManager)

func RunSplits85

func RunSplits85(t *testing.T, peerMgr PeerManager)

Types

type PeerManager

type PeerManager interface {
	CreatePeer() (*Peer, string)
	DestroyPeer(*Peer, string)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL