Added unknown event fallback
This commit is contained in:
parent
cafa2e5559
commit
731af19b08
7
bot.go
7
bot.go
|
@ -312,7 +312,7 @@ func main() {
|
|||
payoutIndex := (b.SideHeight << uint64(math.Ceil(math.Log2(float64(e.Consensus.ChainWindowSize*4))))) | uint64(o.Index)
|
||||
|
||||
bot.Msg(sub.Nick, fmt.Sprintf(
|
||||
"%sPAYOUT%s on %s: %s%s%s XMR%s to %s%s%s:: Main height %s%d%s, Side height %d :: %s/s/%s :: Verify payout %s/p/%s",
|
||||
"%sPAYOUT%s on %s: %s%s%s XMR%s to %s%s%s :: Main height %s%d%s, Side height %d :: %s/s/%s :: Verify payout %s/p/%s",
|
||||
FormatColorLightGreen+FormatBold, FormatReset, e.Name,
|
||||
FormatColorOrange, FormatBold, utils.XMRUnits(o.Value), FormatReset,
|
||||
FormatItalic, utils.Shorten(o.MinerAddress.ToBase58(), 10), FormatReset,
|
||||
|
@ -559,6 +559,11 @@ func main() {
|
|||
slices.Delete(e.PreviousBlocks, i, i+1)
|
||||
blockOrphaned(e, event.SideBlock)
|
||||
}
|
||||
default:
|
||||
log.Printf("unknown event %s", event.Type)
|
||||
e.Ws.Close(websocket.StatusGoingAway, "unknown event")
|
||||
e.Ws = nil
|
||||
break
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue