Documentation ¶
Index ¶
- type Fixtures
- func (f *Fixtures) AddGenesisAccount(address sdk.AccAddress, coins sdk.Coins, flags ...string)
- func (f *Fixtures) CLIConfig(key, value string, flags ...string)
- func (f *Fixtures) Cleanup(dirs ...string)
- func (f *Fixtures) CollectGenTxs(flags ...string)
- func (f *Fixtures) Flags() string
- func (f *Fixtures) GenTx(name string, flags ...string)
- func (f Fixtures) GenesisFile() string
- func (f *Fixtures) KeyAddress(name string) sdk.AccAddress
- func (f *Fixtures) KeysAdd(name string, flags ...string)
- func (f *Fixtures) KeysShow(name string, flags ...string) keys.KeyOutput
- func (f *Fixtures) QueryCheckProof(proof string, flags ...string) rtypes.QueryResCheckProof
- func (f *Fixtures) QueryCheckRequests(proof, requests string, flags ...string) rtypes.QueryResCheckRequests
- func (f *Fixtures) QueryFindAncestor(digest, offset string) rtypes.QueryResFindAncestor
- func (f *Fixtures) QueryFindAncestorInvalid(errStr, digest, offset string)
- func (f *Fixtures) QueryGetBestDigest(delAddr sdk.AccAddress) rtypes.QueryResGetBestDigest
- func (f *Fixtures) QueryGetLastReorgLCA(delAddr sdk.AccAddress) rtypes.QueryResGetLastReorgLCA
- func (f *Fixtures) QueryGetRelayGenesis(delAddr sdk.AccAddress) rtypes.QueryResGetRelayGenesis
- func (f *Fixtures) QueryHeaviestFromAncestor(ancestor, currentBest, newBest, limit string) rtypes.QueryResHeaviestFromAncestor
- func (f *Fixtures) QueryHeaviestFromAncestorInvalid(errStr, ancestor, currentBest, newBest, limit string)
- func (f *Fixtures) QueryIsAncestor(digest, ancestor, limit string) rtypes.QueryResIsAncestor
- func (f *Fixtures) QueryIsMostRecentCommonAncestor(ancestor, left, right, limit string) rtypes.QueryResIsMostRecentCommonAncestor
- func (f *Fixtures) RelayDInit(moniker string, flags ...string)
- func (f *Fixtures) RelayDStart(flags ...string) *tests.Process
- func (f *Fixtures) TxIngestDiffChange(delAddr sdk.AccAddress, prevEpochStart, jsonHeaders string, flags ...string) (bool, string, string)
- func (f *Fixtures) TxIngestHeaders(delAddr sdk.AccAddress, headers string, flags ...string) (bool, string, string)
- func (f *Fixtures) TxMarkNewHeaviest(delAddr sdk.AccAddress, ancestor, currentBest, newBest, limit string, ...) (bool, string, string)
- func (f *Fixtures) TxNewRequest(delAddr sdk.AccAddress, spends, pays, value, numConfs string, flags ...string) (bool, string, string)
- func (f *Fixtures) TxProvideProof(delAddr sdk.AccAddress, proof, listofrequests string, flags ...string) (bool, string, string)
- func (f *Fixtures) UnsafeResetAll(flags ...string)
- type TestData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Fixtures ¶
type Fixtures struct { BinDir string RootDir string RelaydBinary string RelaycliBinary string ChainID string RPCAddr string Port string RelaydHome string RelaycliHome string P2PAddr string T *testing.T }
Fixtures is used to setup the testing environment
func InitFixtures ¶
InitFixtures is called at the beginning of a test and initializes a chain with 1 validator.
func NewFixtures ¶
NewFixtures creates a new instance of Fixtures with many vars set
func (*Fixtures) AddGenesisAccount ¶
AddGenesisAccount is relayd add-genesis-account
func (*Fixtures) Cleanup ¶
Cleanup is meant to be run at the end of a test to clean up an remaining test state
func (*Fixtures) CollectGenTxs ¶
CollectGenTxs is relayd collect-gentxs
func (Fixtures) GenesisFile ¶
GenesisFile returns the path of the generated genesis file
func (*Fixtures) KeyAddress ¶
func (f *Fixtures) KeyAddress(name string) sdk.AccAddress
KeyAddress returns the SDK account address from the key
func (*Fixtures) QueryCheckProof ¶
func (f *Fixtures) QueryCheckProof(proof string, flags ...string) rtypes.QueryResCheckProof
QueryCheckProof returns the Boolean
func (*Fixtures) QueryCheckRequests ¶
func (f *Fixtures) QueryCheckRequests(proof, requests string, flags ...string) rtypes.QueryResCheckRequests
QueryCheckRequests returns the Boolean
func (*Fixtures) QueryFindAncestor ¶
func (f *Fixtures) QueryFindAncestor(digest, offset string) rtypes.QueryResFindAncestor
QueryFindAncestor returns the Boolean
func (*Fixtures) QueryFindAncestorInvalid ¶
QueryFindAncestorInvalid require proper response for invalid query
func (*Fixtures) QueryGetBestDigest ¶
func (f *Fixtures) QueryGetBestDigest(delAddr sdk.AccAddress) rtypes.QueryResGetBestDigest
QueryGetBestDigest returns the Best Known Digest
func (*Fixtures) QueryGetLastReorgLCA ¶
func (f *Fixtures) QueryGetLastReorgLCA(delAddr sdk.AccAddress) rtypes.QueryResGetLastReorgLCA
QueryGetLastReorgLCA returns Last Common Anscestor
func (*Fixtures) QueryGetRelayGenesis ¶
func (f *Fixtures) QueryGetRelayGenesis(delAddr sdk.AccAddress) rtypes.QueryResGetRelayGenesis
QueryGetRelayGenesis returns the relay genesis block Hash
func (*Fixtures) QueryHeaviestFromAncestor ¶
func (f *Fixtures) QueryHeaviestFromAncestor(ancestor, currentBest, newBest, limit string) rtypes.QueryResHeaviestFromAncestor
QueryHeaviestFromAncestor returns a Boolean
func (*Fixtures) QueryHeaviestFromAncestorInvalid ¶
func (f *Fixtures) QueryHeaviestFromAncestorInvalid(errStr, ancestor, currentBest, newBest, limit string)
QueryHeaviestFromAncestorInvalid require proper response for invalid query
func (*Fixtures) QueryIsAncestor ¶
func (f *Fixtures) QueryIsAncestor(digest, ancestor, limit string) rtypes.QueryResIsAncestor
QueryIsAncestor returns the Boolean
func (*Fixtures) QueryIsMostRecentCommonAncestor ¶
func (f *Fixtures) QueryIsMostRecentCommonAncestor(ancestor, left, right, limit string) rtypes.QueryResIsMostRecentCommonAncestor
QueryIsMostRecentCommonAncestor returns a Boolean
func (*Fixtures) RelayDInit ¶
RelayDInit is relayd init NOTE: RelayDInit sets the ChainID for the Fixtures instance
func (*Fixtures) RelayDStart ¶
RelaydStart runs relayd start with the appropriate flags and returns a process
func (*Fixtures) TxIngestDiffChange ¶
func (f *Fixtures) TxIngestDiffChange(delAddr sdk.AccAddress, prevEpochStart, jsonHeaders string, flags ...string) (bool, string, string)
TxIngestDiffChange is relaycli tx that ingests headers with new difficulty
func (*Fixtures) TxIngestHeaders ¶
func (f *Fixtures) TxIngestHeaders(delAddr sdk.AccAddress, headers string, flags ...string) (bool, string, string)
TxIngestHeaders is a relaycli tx that ingests headers with same difficulty as previous headers
func (*Fixtures) TxMarkNewHeaviest ¶
func (f *Fixtures) TxMarkNewHeaviest(delAddr sdk.AccAddress, ancestor, currentBest, newBest, limit string, flags ...string) (bool, string, string)
TxMarkNewHeaviest returns Last Common Anscestor
func (*Fixtures) TxNewRequest ¶
func (f *Fixtures) TxNewRequest(delAddr sdk.AccAddress, spends, pays, value, numConfs string, flags ...string) (bool, string, string)
TxNewRequest is a relaycli tx that submits a new Proof Request
func (*Fixtures) TxProvideProof ¶
func (f *Fixtures) TxProvideProof(delAddr sdk.AccAddress, proof, listofrequests string, flags ...string) (bool, string, string)
TxProvideProof is a relaycli tx that submits a new Proof Request
func (*Fixtures) UnsafeResetAll ¶
UnsafeResetAll is relayd unsafe-reset-all
type TestData ¶
type TestData struct { GenesisHeaders []rtypes.BitcoinHeader NewDiffHeaders []rtypes.BitcoinHeader NewHeaders []rtypes.BitcoinHeader }