func (db *DB) RunMatchingForPrice(pair *match.Pair, price float64) (err error) {

	// create the transaction
	tx, err := db.DBHandler.Begin()
	if err != nil {
		err = fmt.Errorf("Error beginning transaction while running matching for price: \n%s", err)
		return
	}
	defer func() {
		if err != nil {
			tx.Rollback()
			err = fmt.Errorf("Error running matching for price, this might be bad: \n%s", err)
		}
		err = tx.Commit()
	}()

	if err = db.RunMatchingForPriceWithinTransaction(pair, price, tx); err != nil {
		logging.Errorf("This is the error runmatchpricewthintx is getting: %s", err)
		return
	}

	return
}
// RunMatchingForPrice runs matching for only a specific price. Creates a transaction.
RunMatchingForPrice runs matching for only a specific price. Creates a transaction.
// RunMatchingForPrice runs matching for only a specific price . Creates a transaction .
func (db *DB) RunMatchingForPrice(pair *match.Pair, price float64) (err error) {
	tx, err := db.DBHandler.Begin()
	if err != nil {
		err = fmt.Errorf("Error beginning transaction while running matching for price: \n%s", err)
		return
	}
	defer func() {
		if err != nil {
			tx.Rollback()
			err = fmt.Errorf("Error running matching for price, this might be bad: \n%s", err)
		}
		err = tx.Commit()
	}()
	if err = db.RunMatchingForPriceWithinTransaction(pair, price, tx); err != nil {
		logging.Errorf("This is the error runmatchpricewthintx is getting: %s", err)
		return
	}
	return
}
func ( db * DB ) RunMatchingForPrice ( pair * match . Pair , price float64 ) ( err error ) { tx , err := db . DBHandler . Begin ( ) if err != nil { err = fmt . Errorf ( " \n " , err ) return } defer func ( ) { if err != nil { tx . Rollback ( ) err = fmt . Errorf ( " \n " , err ) } err = tx . Commit ( ) } ( ) if err = db . RunMatchingForPriceWithinTransaction ( pair , price , tx ) ; err != nil { logging . Errorf ( " " , err ) return } return }
RunMatchingForPrice runs matching for only a specific price.
RunMatchingForPrice runs matching for only a specific price .
// create the transaction