Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TransactionQueueItem ¶
type TransactionQueueItem struct {
// contains filtered or unexported fields
}
TransactionQueueItem is a wrapper struct on the transaction itself that is used to encapsulate transactions in the priority queue.
type TransactionResponse ¶
TransactionResponse wraps the results provided by the endpoint which will send the transaction in a struct.
type TransactionWorker ¶
type TransactionWorker struct {
// contains filtered or unexported fields
}
TransactionWorker handles all transaction stored inside a priority queue. The priority is given by the nonce, meaning that transactions with lower nonce will be sent first.
func NewTransactionWorker ¶
func NewTransactionWorker(context context.Context, proxy interactors.Proxy, intervalToSend time.Duration) *TransactionWorker
NewTransactionWorker creates a new instance of TransactionWorker.
func (*TransactionWorker) AddTransaction ¶
func (tw *TransactionWorker) AddTransaction(transaction *transaction.FrontendTransaction) <-chan *TransactionResponse
AddTransaction will add a transaction to the priority queue (heap) and will create a channel where the promised result will be broadcast on.
Click to show internal directories.
Click to hide internal directories.