4 "github.com/bytom/vapor/application/mov/contract"
5 "github.com/bytom/vapor/consensus/segwit"
6 "github.com/bytom/vapor/protocol/bc/types"
9 // IsMatchedTx check if this transaction has trade mov order input
10 func IsMatchedTx(tx *types.Tx) bool {
11 if len(tx.Inputs) < 2 {
14 for _, input := range tx.Inputs {
15 if input.InputType() == types.SpendInputType && segwit.IsP2WMCScript(input.ControlProgram()) && contract.IsTradeClauseSelector(input) {
22 // IsCancelOrderTx check if this transaction has cancel mov order input
23 func IsCancelOrderTx(tx *types.Tx) bool {
24 for _, input := range tx.Inputs {
25 if input.InputType() == types.SpendInputType && segwit.IsP2WMCScript(input.ControlProgram()) && contract.IsCancelClauseSelector(input) {