Documentation ¶
Index ¶
- Constants
- func AcmeLiteAddress(pubKey []byte) *url.URL
- func AcmeLiteAddressStdPriv(key ed25519.PrivateKey) *url.URL
- func AcmeLiteAddressTmPriv(key tmcrypto.PrivKey) *url.URL
- func AddCredits(db DB, account *url.URL, credits float64) error
- func BuildTestSynthDepositGenTx() (string, ed25519.PrivateKey, *transactions.Envelope, error)
- func BuildTestTokenTxGenTx(sponsor ed25519.PrivateKey, destAddr string, amount uint64) (*transactions.Envelope, error)
- func CreateADI(db DB, key tmed25519.PrivKey, urlStr types.String) error
- func CreateAdiWithCredits(db DB, key tmed25519.PrivKey, urlStr types.String, credits float64) error
- func CreateFakeSyntheticDepositTx(recipient tmed25519.PrivKey) (*transactions.Envelope, error)
- func CreateKeyBook(db DB, urlStr types.String, pageUrls ...string) error
- func CreateKeyPage(db DB, urlStr types.String, keys ...tmed25519.PubKey) error
- func CreateLiteTokenAccount(db DB, key tmed25519.PrivKey, tokens float64) error
- func CreateLiteTokenAccountWithCredits(db DB, key tmed25519.PrivKey, tokens, credits float64) error
- func CreateTestNet(t *testing.T, numBvns, numValidators, numFollowers int) ([]string, map[string][]*accumulated.Daemon)
- func CreateTokenAccount(db DB, accUrl, tokenUrl string, tokens float64, lite bool) error
- func CreateTokenIssuer(db DB, urlStr, symbol string, precision uint64) error
- func DefaultConfig(net config.NetworkType, node config.NodeType, netId string) *config.Config
- func GenerateKey(seed ...interface{}) ed25519.PrivateKey
- func GetIP() net.IP
- func GetIPs(n int) []net.IP
- func MustParseUrl(s string) *url.URL
- func RunTestNet(t *testing.T, subnets []string, daemons map[string][]*accumulated.Daemon)
- func SkipCI(t testing.TB, reason string)
- func SkipLong(t testing.TB)
- func SkipPlatform(t testing.TB, goos, reason string)
- func SkipPlatformCI(t testing.TB, goos, reason string)
- func WriteStates(db DB, chains ...state.Chain) error
- type DB
- type FakeTendermint
- func (c *FakeTendermint) ABCIQuery(ctx context.Context, path string, data tmbytes.HexBytes) (*ctypes.ResultABCIQuery, error)
- func (c *FakeTendermint) ABCIQueryWithOptions(ctx context.Context, path string, data tmbytes.HexBytes, ...) (*ctypes.ResultABCIQuery, error)
- func (c *FakeTendermint) App() abci.Application
- func (c *FakeTendermint) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *FakeTendermint) BroadcastTxSync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
- func (c *FakeTendermint) CheckTx(ctx context.Context, tx types.Tx) (*ctypes.ResultCheckTx, error)
- func (c *FakeTendermint) Shutdown()
- func (c *FakeTendermint) SubmitTx(ctx context.Context, tx types.Tx) *txStatus
- func (c *FakeTendermint) Tx(ctx context.Context, hash []byte, prove bool) (*ctypes.ResultTx, error)
- func (c *FakeTendermint) Validators() []crypto.PubKey
- type NullRouter
- func (NullRouter) Query(ctx context.Context, subnet string, query []byte, opts client.ABCIQueryOptions) (*core.ResultABCIQuery, error)
- func (NullRouter) Route(account *url.URL) (string, error)
- func (NullRouter) Submit(ctx context.Context, subnet string, tx []byte, pretend, async bool) (*routing.ResponseSubmit, error)
- type TransactionBuilder
- func (tb TransactionBuilder) Sign(signer func(nonce uint64, hash []byte) (protocol.Signature, error)) *protocol.Envelope
- func (tb TransactionBuilder) SignLegacyED25519(key []byte) *protocol.Envelope
- func (tb TransactionBuilder) WithBody(body protocol.TransactionBody) TransactionBuilder
- func (tb TransactionBuilder) WithHeader(hdr *protocol.TransactionHeader) TransactionBuilder
- func (tb TransactionBuilder) WithKeyPage(index, height uint64) TransactionBuilder
- func (tb TransactionBuilder) WithNonce(nonce uint64) TransactionBuilder
- func (tb TransactionBuilder) WithNonceTimestamp() TransactionBuilder
- func (tb TransactionBuilder) WithNonceVar(nonce *uint64) TransactionBuilder
- func (tb TransactionBuilder) WithOrigin(origin *url.URL) TransactionBuilder
- func (tb TransactionBuilder) WithOriginStr(origin string) TransactionBuilder
- func (tb TransactionBuilder) WithTxnHash(hash []byte) TransactionBuilder
Constants ¶
View Source
const DefaultLogLevels = config.DefaultLogLevels //+ ";accumulate=debug"
View Source
const LogConsole = true
View Source
const TestTokenAmount = 5e5
View Source
const TokenMx = protocol.AcmePrecision
Token multiplier
Variables ¶
This section is empty.
Functions ¶
func AcmeLiteAddress ¶
AcmeLiteAddress creates an ACME lite address for the given key. FOR TESTING USE ONLY.
func AcmeLiteAddressStdPriv ¶
func AcmeLiteAddressStdPriv(key ed25519.PrivateKey) *url.URL
func BuildTestSynthDepositGenTx ¶
func BuildTestSynthDepositGenTx() (string, ed25519.PrivateKey, *transactions.Envelope, error)
func BuildTestTokenTxGenTx ¶
func BuildTestTokenTxGenTx(sponsor ed25519.PrivateKey, destAddr string, amount uint64) (*transactions.Envelope, error)
func CreateAdiWithCredits ¶
func CreateFakeSyntheticDepositTx ¶
func CreateFakeSyntheticDepositTx(recipient tmed25519.PrivKey) (*transactions.Envelope, error)
func CreateLiteTokenAccount ¶
func CreateTestNet ¶
func CreateTokenAccount ¶
func CreateTokenIssuer ¶
func DefaultConfig ¶
func GenerateKey ¶
func GenerateKey(seed ...interface{}) ed25519.PrivateKey
func MustParseUrl ¶
func RunTestNet ¶
func SkipPlatform ¶
SkipPlatform skips a test when on a specific GOOS.
func SkipPlatformCI ¶
SkipPlatformCI skips a test when running in CI on a specific GOOS.
Types ¶
type FakeTendermint ¶
type FakeTendermint struct {
// contains filtered or unexported fields
}
FakeTendermint is a test harness that facilitates testing the ABCI application without creating an actual Tendermint node.
func NewFakeTendermint ¶
func (*FakeTendermint) ABCIQuery ¶
func (c *FakeTendermint) ABCIQuery(ctx context.Context, path string, data tmbytes.HexBytes) (*ctypes.ResultABCIQuery, error)
func (*FakeTendermint) ABCIQueryWithOptions ¶
func (c *FakeTendermint) ABCIQueryWithOptions(ctx context.Context, path string, data tmbytes.HexBytes, opts rpc.ABCIQueryOptions) (*ctypes.ResultABCIQuery, error)
func (*FakeTendermint) App ¶
func (c *FakeTendermint) App() abci.Application
func (*FakeTendermint) BroadcastTxAsync ¶
func (c *FakeTendermint) BroadcastTxAsync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
func (*FakeTendermint) BroadcastTxSync ¶
func (c *FakeTendermint) BroadcastTxSync(ctx context.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error)
func (*FakeTendermint) CheckTx ¶
func (c *FakeTendermint) CheckTx(ctx context.Context, tx types.Tx) (*ctypes.ResultCheckTx, error)
func (*FakeTendermint) Shutdown ¶
func (c *FakeTendermint) Shutdown()
func (*FakeTendermint) SubmitTx ¶
func (c *FakeTendermint) SubmitTx(ctx context.Context, tx types.Tx) *txStatus
func (*FakeTendermint) Validators ¶ added in v0.5.1
func (c *FakeTendermint) Validators() []crypto.PubKey
type NullRouter ¶ added in v0.5.1
type NullRouter struct{}
func (NullRouter) Query ¶ added in v0.5.1
func (NullRouter) Query(ctx context.Context, subnet string, query []byte, opts client.ABCIQueryOptions) (*core.ResultABCIQuery, error)
type TransactionBuilder ¶
func NewTransaction ¶
func NewTransaction() TransactionBuilder
func (TransactionBuilder) SignLegacyED25519 ¶
func (tb TransactionBuilder) SignLegacyED25519(key []byte) *protocol.Envelope
func (TransactionBuilder) WithBody ¶
func (tb TransactionBuilder) WithBody(body protocol.TransactionBody) TransactionBuilder
func (TransactionBuilder) WithHeader ¶
func (tb TransactionBuilder) WithHeader(hdr *protocol.TransactionHeader) TransactionBuilder
func (TransactionBuilder) WithKeyPage ¶
func (tb TransactionBuilder) WithKeyPage(index, height uint64) TransactionBuilder
func (TransactionBuilder) WithNonce ¶
func (tb TransactionBuilder) WithNonce(nonce uint64) TransactionBuilder
func (TransactionBuilder) WithNonceTimestamp ¶
func (tb TransactionBuilder) WithNonceTimestamp() TransactionBuilder
func (TransactionBuilder) WithNonceVar ¶
func (tb TransactionBuilder) WithNonceVar(nonce *uint64) TransactionBuilder
func (TransactionBuilder) WithOrigin ¶
func (tb TransactionBuilder) WithOrigin(origin *url.URL) TransactionBuilder
func (TransactionBuilder) WithOriginStr ¶
func (tb TransactionBuilder) WithOriginStr(origin string) TransactionBuilder
func (TransactionBuilder) WithTxnHash ¶
func (tb TransactionBuilder) WithTxnHash(hash []byte) TransactionBuilder
Source Files ¶
Click to show internal directories.
Click to hide internal directories.