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 Market
- type OrderMatchedState
- type TimingMatcher
Constants ¶
View Source
const ( OrderHashPrefix = "matcher_orderhash_" OwnerPrefix = "matcher_owner_" RingHashPrefix = "matcher_ringhash_" RoundPrefix = "matcher_round_" FailedRingPrefix = "failed_ring_" FailedOrderPrefix = "failed_order_" RinghashToUniqueIdPrefix = "ringhash_uniqid_" )
orderhash ringhash matchedstate owner tokenS orderhash ringhash orderhash+owner+tokens round orderhash
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 Market ¶
type Market struct { TokenA common.Address TokenB common.Address AtoBOrders map[common.Hash]*types.OrderState BtoAOrders map[common.Hash]*types.OrderState AtoBOrderHashesExcludeNextRound []common.Hash BtoAOrderHashesExcludeNextRound []common.Hash // contains filtered or unexported fields }
func NewMarket ¶
func NewMarket(protocolAddress *ethaccessor.ProtocolAddress, tokenS, tokenB common.Address, matcher *TimingMatcher, om ordermanager.OrderManager) *Market
func (*Market) GenerateCandidateRing ¶
func (market *Market) GenerateCandidateRing(orders ...*types.OrderState) (*CandidateRing, error)
type OrderMatchedState ¶
type TimingMatcher ¶
type TimingMatcher struct {
// contains filtered or unexported fields
}
func NewTimingMatcher ¶
func NewTimingMatcher(matcherOptions *config.TimingMatcher, submitter *miner.RingSubmitter, evaluator *miner.Evaluator, om ordermanager.OrderManager, accountManager *marketLib.AccountManager, rds dao.RdsService) *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.