Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultBundlesSelectionLimit = 8 IndeterminateResponsesToleranceLimit = 10 MinutesInWindow = 3 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SubmitterEngine ¶
type SubmitterEngine struct { HorizonClient horizonclient.ClientInterface preconditions.LedgerNumberTracker signing.SignatureService MaxBaseFee int }
SubmitterEngine aggregates the dependencies that are shared between all Submitter instances, such as the Ledger number tracker.
func (*SubmitterEngine) Validate ¶
func (se *SubmitterEngine) Validate() error
type TransactionProcessingLimiter ¶
type TransactionProcessingLimiter interface { // AdjustLimitIfNeeded is used to temporarily adjust the limitValue variable, returned by the LimitValue() getter, // if it starts seeing a high number of indeterminate responses from Horizon, which are indicative of network // congestion. The following error codes are considered indeterminate responses: // - 504: Timeout // - 429: Too Many Requests // - 400 - tx_insufficient_fee: Bad Request AdjustLimitIfNeeded(hErr *utils.HorizonErrorWrapper) // LimitValue returns the current value of the limitValue variable, which is used to determine the number of channel // accounts to process transactions for in a single iteration. If the value being returned was downsized due to // indeterminate responses, the method will restore it to the original value after a fixed window of time has // passed. LimitValue() int }
TransactionProcessingLimiter is an interface that defines the methods that the manager and transaction worker use to share metadata about and adjust the rate at which transactions are processed based on responses from Horizon.
type TransactionProcessingLimiterImpl ¶
type TransactionProcessingLimiterImpl struct { CurrNumChannelAccounts int IndeterminateResponsesCounter int CounterLastUpdated time.Time // contains filtered or unexported fields }
TransactionProcessingLimiter is an interface that defines the methods that the manager and transaction worker use to share metadata about and adjust the rate at which transactions are processed based on responses from Horizon.
func NewTransactionProcessingLimiter ¶
func NewTransactionProcessingLimiter(limit int) *TransactionProcessingLimiterImpl
func (*TransactionProcessingLimiterImpl) AdjustLimitIfNeeded ¶
func (tpl *TransactionProcessingLimiterImpl) AdjustLimitIfNeeded(hErr *utils.HorizonErrorWrapper)
func (*TransactionProcessingLimiterImpl) LimitValue ¶
func (tpl *TransactionProcessingLimiterImpl) LimitValue() int
Click to show internal directories.
Click to hide internal directories.