Documentation ¶
Index ¶
- Constants
- Variables
- func AreAllConnected(t *testing.T, hosts []host.Host) bool
- func Connect(t *testing.T, a, b host.Host) error
- func ConnectAll(t *testing.T, hosts []host.Host) error
- func CreateHost(t *testing.T, options ...libp2p.Option) host.Host
- func CreateHosts(t *testing.T, ctx context.Context, n int, options ...libp2p.Option) []host.Host
- func CreateHostsWithKeys(t *testing.T, ctx context.Context, keys []crypto.PrivKey, ...) []host.Host
- func GenerateNodeKeys(n int) ([]crypto.PrivKey, error)
- func GetTestKeys(t *testing.T, numPeers int) ([]crypto.PrivKey, peer.IDSlice, []keygen.LocalPartySaveData, ...)
- func GetTestP2pNodeKeys(count int) []crypto.PrivKey
- func GetTestPartyIDs(count int) tss.UnSortedPartyIDs
- func GetTestTssKeys(count int) []keygen.LocalPartySaveData
- func IsConnected(t *testing.T, a, b host.Host) bool
- func KeyPath(index int) string
- func MustConnectAll(t *testing.T, hosts []host.Host)
- func MustDecodePeerID(s string) peer.ID
- func PartyIDsFromPeerIDs(peerIDs []peer.ID) tss.UnSortedPartyIDs
- func PeerIDsFromHosts(hosts []host.Host) []peer.ID
- func PeerIDsFromKeys(keys []crypto.PrivKey) []peer.ID
- func ReadP2pNodeTestKey(index int) crypto.PrivKey
- func ReadTestKey(index int) keygen.LocalPartySaveData
- func TestLoadKey(t *testing.T)
- func WriteP2pNodeTestKey(index int, key crypto.PrivKey)
- func WriteTestKey(index int, key keygen.LocalPartySaveData)
Constants ¶
View Source
const TestPartyCount = 5
View Source
const TestThreshold = 3
Variables ¶
View Source
var TestPeerIDs = []peer.ID{ MustDecodePeerID("16Uiu2HAm9z3t15JpqBbPQJ1ZLHm6w1AXD6M2FXdCG3GLoY4iDcD9"), MustDecodePeerID("16Uiu2HAkwC5w1fC4xLL3hWjD6PGuk2qzGgsWdXfNeqMi8xDn2AT7"), MustDecodePeerID("16Uiu2HAmTdEddBdw1JVs5tHhqQGaFPkqq64TwppmL2G8fYbZeZei"), MustDecodePeerID("16Uiu2HAm48kushm1oCczim8L6adoCXV9A3npssbAFMM6Cgw3pYcS"), MustDecodePeerID("16Uiu2HAmR3sVyPwLtkemjCoU1XbZcjxcfRHzpopydvEEFbHKGiq4"), }
Functions ¶
func AreAllConnected ¶
AreAllConnected returns true if all hosts are connected to one another
func CreateHosts ¶
func CreateHostsWithKeys ¶
func GenerateNodeKeys ¶
GenerateNodeKeys returns a slice of private keys.
func GetTestKeys ¶
func GetTestP2pNodeKeys ¶
func GetTestPartyIDs ¶
func GetTestPartyIDs(count int) tss.UnSortedPartyIDs
GetTestPartyIDs returns a list of party IDs derived from fixture libp2p publickeys for testing.
func GetTestTssKeys ¶
func GetTestTssKeys(count int) []keygen.LocalPartySaveData
func IsConnected ¶
IsConnected returns true if a and b hosts have a live, open connection in both directions
func MustDecodePeerID ¶
func PartyIDsFromPeerIDs ¶
func PartyIDsFromPeerIDs(peerIDs []peer.ID) tss.UnSortedPartyIDs
func PeerIDsFromHosts ¶
PeerIDsFromHosts returns a slice of peer IDs from a slice of hosts
func PeerIDsFromKeys ¶
PeerIDsFromKeys returns a slice of peer IDs from the given slice of private keys.
func ReadP2pNodeTestKey ¶
func ReadTestKey ¶
func ReadTestKey(index int) keygen.LocalPartySaveData
func TestLoadKey ¶
func WriteP2pNodeTestKey ¶
func WriteTestKey ¶
func WriteTestKey(index int, key keygen.LocalPartySaveData)
Types ¶
This section is empty.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.