We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MM bot panic (note, I'm running my own fork at https://github.com/norwnd/dcrdex/commits/master - but this is probably relevant for thus upstream repo too):
panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x2 addr=0x8 pc=0x102a4c268] goroutine 4980 [running]: decred.org/dcrdex/client/mm.(*unifiedExchangeAdaptor).placeMultiTrade(0x14006ba6600, {0x1400b60a0a0, 0x1, 0x10383541c?}, 0x1) /Users/norwnd/dcrdex/client/mm/exchange_adaptor.go:970 +0x438 decred.org/dcrdex/client/mm.(*unifiedExchangeAdaptor).multiTrade(0x14006ba6600, {0x1400b60a088, 0x1, 0x1400b608150?}, 0x1, 0x0, 0x6e4f8d3) /Users/norwnd/dcrdex/client/mm/exchange_adaptor.go:1343 +0xc60 decred.org/dcrdex/client/mm.(*basicMarketMaker).rebalance(0x140087e20c0, 0x6e4f8d3) /Users/norwnd/dcrdex/client/mm/mm_basic.go:590 +0x274 decred.org/dcrdex/client/mm.(*basicMarketMaker).botLoop.func1() /Users/norwnd/dcrdex/client/mm/mm_basic.go:634 +0x294 created by decred.org/dcrdex/client/mm.(*basicMarketMaker).botLoop in goroutine 3828 /Users/norwnd/dcrdex/client/mm/mm_basic.go:619 +0x26c make: *** [a] Error 2
I think MultiTrade func needs to be adjusted like this:
MultiTrade
// MultiTrade is used to place multiple standing limit orders on the same // side of the same market simultaneously. func (c *Core) MultiTrade(pw []byte, form *MultiTradeForm) []*MultiTradeResult { results := make([]*MultiTradeResult, 0, len(form.Placements)) reqs, err := c.prepareMultiTradeRequests(pw, form) if err != nil { for range form.Placements { results = append(results, &MultiTradeResult{Error: err}) } return results } for _, req := range reqs { var corder *Order corder, err = c.sendTradeRequest(req) if err != nil { results = append(results, &MultiTradeResult{Error: err}) continue } results = append(results, &MultiTradeResult{Order: corder}) } return results }
there is a related "sanity-check" in MM code after MultiTrade is called (but it's always gonna pass with master code version):
master
if len(placements) != len(results) { u.log.Errorf("unexpected number of results. expected %d, got %d", len(placements), len(results)) return results }
not sure if all that ^ means there is a deeper underlying issue, but panic is certainly not a desired outcome.
panic
The text was updated successfully, but these errors were encountered:
fix MM bot panic (see decred#3130 for details)
7278546
No branches or pull requests
MM bot panic (note, I'm running my own fork at https://github.com/norwnd/dcrdex/commits/master - but this is probably relevant for thus upstream repo too):
I think
MultiTrade
func needs to be adjusted like this:there is a related "sanity-check" in MM code after
MultiTrade
is called (but it's always gonna pass withmaster
code version):not sure if all that ^ means there is a deeper underlying issue, but
panic
is certainly not a desired outcome.The text was updated successfully, but these errors were encountered: