Documentation ¶
Index ¶
- Constants
- func CVSquare(rateRatios []*big.Int, scale *big.Int) *big.Int
- func NewRing(filledOrders []*types.FilledOrder) *types.Ring
- func PriceRateCVSquare(ringState *types.Ring) (*big.Int, error)
- func PriceValid(a2BOrder *types.OrderState, b2AOrder *types.OrderState) bool
- func ReducedRate(ringState *types.Ring) *big.Rat
- type Evaluator
- type Matcher
- type Miner
- type NormalSenderAddress
- type RingSubmitFailed
- type RingSubmitter
- type SplitMinerAddress
Constants ¶
View Source
const SubmitRingMethod_LastId = "submitringmethod_lastid"
Variables ¶
This section is empty.
Functions ¶
func PriceValid ¶
func PriceValid(a2BOrder *types.OrderState, b2AOrder *types.OrderState) bool
成环之后才可计算能否成交,否则不需计算,判断是否能够成交,不能使用除法计算
Types ¶
type Evaluator ¶
type Evaluator struct {
// contains filtered or unexported fields
}
func NewEvaluator ¶
func NewEvaluator(marketCapProvider marketcap.MarketCapProvider, minerOptions config.MinerOptions) *Evaluator
func (*Evaluator) SetMatcher ¶
type Miner ¶
type Miner struct {
// contains filtered or unexported fields
}
func NewMiner ¶
func NewMiner(submitter *RingSubmitter, matcher Matcher, evaluator *Evaluator, marketCapProvider marketcap.MarketCapProvider) *Miner
type NormalSenderAddress ¶
type RingSubmitFailed ¶
type RingSubmitter ¶
type RingSubmitter struct {
// contains filtered or unexported fields
}
保存ring,并将ring发送到区块链,同样需要分为待完成和已完成
func NewSubmitter ¶
func NewSubmitter(options config.MinerOptions, dbService dao.RdsService, marketCapProvider marketcap.MarketCapProvider) (*RingSubmitter, error)
func (*RingSubmitter) GenerateRingSubmitInfo ¶
func (submitter *RingSubmitter) GenerateRingSubmitInfo(ringState *types.Ring) (*types.RingSubmitInfo, error)
Click to show internal directories.
Click to hide internal directories.