Documentation ¶
Index ¶
- Constants
- func AddFailedRingCache(uniqueId, txhash common.Hash, orderhashes []common.Hash)
- func AddMinedRing(ringState *types.RingSubmitInfo)
- func CacheRinghashToUniqueId(ringhash, uniqueId common.Hash)
- func CachedMatchedRing(ringhash common.Hash) (bool, error)
- func CachedRinghashes() ([]common.Hash, error)
- func DealtAmount(orderhash common.Hash) (dealtAmountS, dealtAmountB *big.Rat, err error)
- func FilledAmountS(owner, tokenS common.Address) (filledAmountS *big.Rat, err error)
- func GetUniqueIdByRinghash(ringhash common.Hash) (common.Hash, error)
- func OrderExecuteFailedCount(orderhash common.Hash) (int64, error)
- func RemoveMinedRingAndReturnOrderhashes(ringhash common.Hash) ([]common.Hash, error)
- func RingExecuteFailedCount(uniqueId common.Hash) (int64, error)
- type CandidateRing
- type CandidateRingList
- type ClusterNode
- type Market
- type Markets
- type NodeInterface
- type OrderHashes
- type OrderMatchedState
- type OrdersState
- type SingleNode
- type TimingMatcher
Constants ¶
View Source
const ( OrderHashPrefix = "matcher_orderhash_" OwnerPrefix = "matcher_owner_" RingHashPrefix = "matcher_ringhash_" FailedRingPrefix = "failed_ring_" FailedOrderPrefix = "failed_order_" RinghashToUniqueIdPrefix = "ringhash_uniqid_" )
orderhash ringhash matchedstate owner tokenS orderhash ringhash orderhash+owner+tokens round orderhash
View Source
const (
Task_Balancer_Name = "task_balancer_timingmatcher"
)
Variables ¶
This section is empty.
Functions ¶
func AddFailedRingCache ¶
func CacheRinghashToUniqueId ¶
func CachedRinghashes ¶
func DealtAmount ¶
func FilledAmountS ¶
Types ¶
type CandidateRing ¶
type CandidateRing struct {
// contains filtered or unexported fields
}
type CandidateRingList ¶
type CandidateRingList []CandidateRing
func (CandidateRingList) Len ¶
func (ringList CandidateRingList) Len() int
func (CandidateRingList) Less ¶
func (ringList CandidateRingList) Less(i, j int) bool
func (CandidateRingList) Swap ¶
func (ringList CandidateRingList) Swap(i, j int)
type ClusterNode ¶
type ClusterNode struct {
// contains filtered or unexported fields
}
type Market ¶
type Market struct { TokenA common.Address TokenB common.Address AtoBOrders *OrdersState BtoAOrders *OrdersState // contains filtered or unexported fields }
func NewMarket ¶
func NewMarket(protocolAddress *loopringaccessor.ProtocolAddress, tokenS, tokenB common.Address, matcher *TimingMatcher) *Market
func (*Market) GenerateCandidateRing ¶
func (market *Market) GenerateCandidateRing(orders ...*types.OrderState) (*CandidateRing, error)
type NodeInterface ¶
type NodeInterface interface {
// contains filtered or unexported methods
}
type OrderHashes ¶
func (OrderHashes) AddHash ¶
func (hashes OrderHashes) AddHash(hash1 common.Hash)
type OrderMatchedState ¶
type OrdersState ¶
type OrdersState struct { Orders map[common.Hash]*types.OrderState OrderHashesExcludeNextRound OrderHashes }
type SingleNode ¶
type SingleNode struct {
// contains filtered or unexported fields
}
type TimingMatcher ¶
type TimingMatcher struct {
// contains filtered or unexported fields
}
func NewTimingMatcher ¶
func NewTimingMatcher(matcherOptions *config.TimingMatcher, submitter *miner.RingSubmitter, evaluator *miner.Evaluator, rds dao.RdsServiceImpl, marketcapProvider marketcap.MarketCapProvider, kafkaOptions kafka.KafkaOptions, ) *TimingMatcher
func (*TimingMatcher) GetAccountAvailableAmount ¶
func (*TimingMatcher) Start ¶
func (matcher *TimingMatcher) Start()
func (*TimingMatcher) Stop ¶
func (matcher *TimingMatcher) Stop()
Click to show internal directories.
Click to hide internal directories.