Documentation ¶
Overview ¶
Structs and functions used in stress tests
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type RandomBitcoinClient ¶
type RandomBitcoinClient struct {
// contains filtered or unexported fields
}
RandomBitcoinClient implements bitcoin.Client and generates random bitcoin transactions.
func (*RandomBitcoinClient) GetBlockCount ¶
func (c *RandomBitcoinClient) GetBlockCount() (int64, error)
func (*RandomBitcoinClient) GetBlockHash ¶
func (c *RandomBitcoinClient) GetBlockHash(blockHeight int64) (*chainhash.Hash, error)
This should always return testnet genesis block hash for `0` so production bitcoin.Listener genesis block check will fail.
func (*RandomBitcoinClient) Start ¶
func (c *RandomBitcoinClient) Start(addresses <-chan string)
type RandomEthereumClient ¶
type RandomEthereumClient struct {
// contains filtered or unexported fields
}
RandomEthereumClient implements ethereum.Client and generates random ethereum transactions.
func (*RandomEthereumClient) BlockByNumber ¶
func (*RandomEthereumClient) NetworkID ¶
This should always return testnet ID so production ethereum.Listener genesis block check will fail.
func (*RandomEthereumClient) Start ¶
func (c *RandomEthereumClient) Start(addresses <-chan string)
type Users ¶
type Users struct { Horizon frontier.ClientInterface NetworkPassphrase string UsersPerSecond int BifrostPorts []int IssuerPublicKey string // contains filtered or unexported fields }
Users is responsible for imitating user interactions:
- Request a new bifrost address by calling /generate-bitcoin-address or /generate-ethereum-address.
- Add a generate address to RandomBitcoinClient or RandomEthereumClient so it generates a new transaction and puts it in a future block.
- Once account is funded, create a trustline.
- Wait for BTC/ETH payment.
func (*Users) Start ¶
func (u *Users) Start(accounts chan<- server.GenerateAddressResponse)
Click to show internal directories.
Click to hide internal directories.