test

package
v0.9.0-alpha Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package test contains predefined set of PeerInfo for testing. Generating private keys is computationally expensive, which slows down tests dramatically. Using a cache of pre-calculated private keys defined here to keeps tests fast.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EncodedPeerInfo

type EncodedPeerInfo struct {
	Base64PrivKey string
	B58PeerID     string
}

EncodedPeerInfo holds encoded private keys and peerIDs for test peers.

type PeerInfo

type PeerInfo struct {
	PrivKey        crypto.PrivKey
	PubKey         crypto.PubKey
	PeerID         peer.ID
	EncodedPrivKey string
	EncodedPeerID  string
}

PeerInfo holds deencoded keys and peerIDs for test peers.

func GetTestPeerInfo

func GetTestPeerInfo(i int) *PeerInfo

GetTestPeerInfo gets PeerInfo for constructing a peer for testing.

Jump to

Keyboard shortcuts

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