This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | |
| index 01bc2af7a..c65db6949 100644 | |
| --- a/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | |
| +++ b/cmd/exchange_wrapper_standards/exchange_wrapper_standards_test.go | |
| @@ -289,6 +289,8 @@ func generateMethodArg(ctx context.Context, t *testing.T, argGenerator *MethodAr | |
| // Crypto Chain | |
| input = reflect.ValueOf(cryptoChainPerExchange[exchName]) | |
| } | |
| + case "MatchSymbolWithAvailablePairs", "MatchSymbolCheckEnabled": | |
| + input = reflect.ValueOf(argGenerator.AssetParams.Pair.Base.Lower().String() + argGenerator.AssetParams.Pair.Quote.Lower().String()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/exchanges/orderbook/orderbook.go b/exchanges/orderbook/orderbook.go | |
| index 42ece3929..0683aa299 100644 | |
| --- a/exchanges/orderbook/orderbook.go | |
| +++ b/exchanges/orderbook/orderbook.go | |
| @@ -15,12 +15,20 @@ import ( | |
| // Get checks and returns the orderbook given an exchange name and currency pair | |
| func Get(exchange string, p currency.Pair, a asset.Item) (*Base, error) { | |
| + tt := time.Now() | |
| + defer func() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/connchecker/connchecker.go b/connchecker/connchecker.go | |
| index 59705ce6f..072837719 100644 | |
| --- a/connchecker/connchecker.go | |
| +++ b/connchecker/connchecker.go | |
| @@ -51,7 +51,7 @@ func New(dnsList, domainList []string, checkInterval time.Duration) (*Checker, e | |
| if err := c.initialCheck(); err != nil { | |
| return nil, err | |
| } | |
| - | |
| + c.mu.Lock() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/cmd/gctcli/commands.go b/cmd/gctcli/commands.go | |
| index 76efb3312..9a84799da 100644 | |
| --- a/cmd/gctcli/commands.go | |
| +++ b/cmd/gctcli/commands.go | |
| @@ -3963,7 +3963,10 @@ func getHistoricCandles(c *cli.Context) error { | |
| e := time.Now().Truncate(candleInterval) | |
| s := e.Add(-candleInterval * time.Duration(candleRangeSize)) | |
| - | |
| + fmt.Println(s) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type TestAlerter struct { | |
| n alert.Notice | |
| } | |
| type Result struct { | |
| Time time.Duration | |
| Set bool | |
| } | |
| type TestResultHolder struct { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // branch | |
| func BenchmarkWebsocketDataReceiver(b *testing.B) { | |
| var m *websocketRoutineManager | |
| m = new(websocketRoutineManager) | |
| m.shutdown = make(chan struct{}) | |
| err := m.registerWebsocketDataHandler(m.websocketDataHandler, true) | |
| if !errors.Is(err, nil) { | |
| b.Fatalf("received: '%v' but expected: '%v'", err, nil) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func BenchmarkThing(b *testing.B) { | |
| for i := 0; i < b.N; i++ { | |
| s := "211231" | |
| isNumberedContract := true | |
| for _, c := range s { | |
| if c < '0' || c > '9' { | |
| isNumberedContract = false | |
| } | |
| } | |
| if !isNumberedContract { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/engine/rpcserver_test.go b/engine/rpcserver_test.go | |
| index 283dc5daf..5c0552625 100644 | |
| --- a/engine/rpcserver_test.go | |
| +++ b/engine/rpcserver_test.go | |
| @@ -988,6 +988,9 @@ func TestGetOrders(t *testing.T) { | |
| } | |
| exch.SetDefaults() | |
| b := exch.GetBase() | |
| + b.API.Credentials.Key = "test" | |
| + b.API.Credentials.Secret = "test" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/engine/order_manager.go b/engine/order_manager.go | |
| index 859e32b3c..b00df09a7 100644 | |
| --- a/engine/order_manager.go | |
| +++ b/engine/order_manager.go | |
| @@ -240,8 +240,8 @@ func (m *OrderManager) GetOrderInfo(exchangeName, orderID string, cp currency.Pa | |
| return order.Detail{}, err | |
| } | |
| - err = m.orderStore.upsert(&result) | |
| - if err != nil && err != ErrOrdersAlreadyExists { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| func ReturnErr() error { | |
| return errors.New("hello") | |
| } | |
| func DeferErr() error { | |
| return errors.New("deferred") | |
| } | |
| func HandleErrs() error { |