signertest

package
v1.11.12-rc.8 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var SignerTests = map[string]func(t *testing.T, s warp.Signer, sk *bls.SecretKey, networkID uint32, chainID ids.ID){
	"WrongChainID":   TestWrongChainID,
	"WrongNetworkID": TestWrongNetworkID,
	"Verifies":       TestVerifies,
}

SignerTests is a list of all signer tests

Functions

func TestVerifies

func TestVerifies(t *testing.T, s warp.Signer, sk *bls.SecretKey, networkID uint32, chainID ids.ID)

Test that a signature generated with the signer verifies correctly

func TestWrongChainID

func TestWrongChainID(t *testing.T, s warp.Signer, _ *bls.SecretKey, _ uint32, _ ids.ID)

Test that using a random SourceChainID results in an error

func TestWrongNetworkID

func TestWrongNetworkID(t *testing.T, s warp.Signer, _ *bls.SecretKey, networkID uint32, blockchainID ids.ID)

Test that using a different networkID results in an error

Types

This section is empty.

Jump to

Keyboard shortcuts

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