Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct { BuyTickets bool // Account to buy tickets from Account uint32 // Account to derive voting addresses from; overridden by VotingAddr VotingAccount uint32 // Minimum amount to maintain in purchasing account Maintain dcrutil.Amount // Address to assign voting rights; overrides VotingAccount VotingAddr dcrutil.Address // Commitment address for stakepool fees PoolFeeAddr dcrutil.Address // Stakepool fee percentage (between 0-100) PoolFees float64 // Limit maximum number of purchased tickets per block Limit int // CSPP-related options CSPPServer string DialCSPPServer func(ctx context.Context, network, addr string) (net.Conn, error) MixedAccount uint32 MixedAccountBranch uint32 TicketSplitAccount uint32 ChangeAccount uint32 MixChange bool // VSP-related options VSP *vsp.VSP }
Config modifies the behavior of TB.
type TB ¶
type TB struct {
// contains filtered or unexported fields
}
TB is an automated ticket buyer, buying as many tickets as possible given an account's available balance. TB may be configured to buy tickets for any arbitrary voting address or (optional) stakepool.
func (*TB) AccessConfig ¶
AccessConfig runs f with the current config passed as a parameter. The config is protected by a mutex and this function is safe for concurrent access to read or modify the config. It is unsafe to leak a pointer to the config, but a copy of *cfg is legal.
Click to show internal directories.
Click to hide internal directories.