ops

package
v0.1.1-0...-94ed833 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 8, 2020 License: MIT Imports: 27 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Approve

func Approve(_spender common.Address, amt *big.Int, ctx context.Context) error

func Balance

func Balance(ctx context.Context, addr common.Address) error

func Deposit

func Deposit(ctx context.Context) error

func Dispute

func Dispute(requestId *big.Int, timestamp *big.Int, minerIndex *big.Int, ctx context.Context) error

func List

func List(ctx context.Context) error

func PrepareEthTransaction

func PrepareEthTransaction(ctx context.Context) (*bind.TransactOpts, error)

func RequestStakingWithdraw

func RequestStakingWithdraw(ctx context.Context) error

func ShowStatus

func ShowStatus(ctx context.Context) error

func Transfer

func Transfer(toAddress common.Address, amt *big.Int, ctx context.Context) error

func Vote

func Vote(_disputeId *big.Int, _supportsDispute bool, ctx context.Context) error

func WithdrawStake

func WithdrawStake(ctx context.Context) error

Types

type DataRequester

type DataRequester struct {
	// contains filtered or unexported fields
}

DataRequester responsible for submitting tips to request data periodically if configured to do so

func CreateDataRequester

func CreateDataRequester(exitCh chan os.Signal, submitter tellorCommon.TransactionSubmitter, checkIntervalSeconds time.Duration, proxy db.DataServerProxy) *DataRequester

CreateDataRequester creates a requester instance

func (*DataRequester) IsRunning

func (r *DataRequester) IsRunning() bool

IsRunning checks whether this requester is requesting data

func (*DataRequester) Start

func (r *DataRequester) Start(ctx context.Context) error

Start kicks of go routines to periodically submit tips if configured to do so

type DataServerOps

type DataServerOps struct {
	Running bool
	// contains filtered or unexported fields
}

DataServerOps is the driver for data server

func CreateDataServerOps

func CreateDataServerOps(ctx context.Context, exitCh chan os.Signal) (*DataServerOps, error)

CreateDataServerOps creates a data server instance for runtime

func (*DataServerOps) Ready

func (ops *DataServerOps) Ready() chan bool

Ready signals that the data server has completed at least one tracker cycle and any external dependencies should be ready to use its initial output

func (*DataServerOps) Start

func (ops *DataServerOps) Start(ctx context.Context)

Start the data server

type MiningMgr

type MiningMgr struct {
	Running bool
	// contains filtered or unexported fields
}

MiningMgr holds items for mining and requesting data

func CreateMiningManager

func CreateMiningManager(ctx context.Context, exitCh chan os.Signal, submitter tellorCommon.TransactionSubmitter) (*MiningMgr, error)

CreateMiningManager creates a new manager that mananges mining and data requests

func (*MiningMgr) Start

func (mgr *MiningMgr) Start(ctx context.Context)

Start will start the mining run loop

type SolutionSink

type SolutionSink interface {
	Submit(context.Context, *pow.Result) bool
}

type TxnSubmitter

type TxnSubmitter struct {
}

TxnSubmitter just concrete type for txn submitter

func NewSubmitter

func NewSubmitter() TxnSubmitter

NewSubmitter creates a new TxnSubmitter instance

func (TxnSubmitter) PrepareTransaction

func (s TxnSubmitter) PrepareTransaction(ctx context.Context, proxy db.DataServerProxy, ctxName string, callback tellorCommon.TransactionGeneratorFN) error

PrepareTransaction relies on rpc package to prepare and submit transactions

type WorkSource

type WorkSource interface {
	GetWork(input chan *pow.Work) (*pow.Work, bool)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL