mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-05 15:10:59 +00:00
Exchanges: Add config variable to set bypassing of orderbook verification by exchange (#614)
* Exchanges: Add config variable to set bypassing of orderbook verification * Exchanges: Consolidate orderbook variables into config struct * Exchanges: Addr nit; set verification bypass on websocket book implementations
This commit is contained in:
@@ -275,13 +275,12 @@ func (b *Base) Process() error {
|
||||
b.LastUpdated = time.Now()
|
||||
}
|
||||
|
||||
if !b.HasChecksumValidation {
|
||||
if !b.VerificationBypass && !b.HasChecksumValidation {
|
||||
err := b.Verify()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
return service.Update(b)
|
||||
}
|
||||
|
||||
|
||||
@@ -85,6 +85,9 @@ type Base struct {
|
||||
NotAggregated bool `json:"-"`
|
||||
IsFundingRate bool `json:"fundingRate"`
|
||||
|
||||
// VerificationBypass is a complete orderbook verification bypass set by
|
||||
// user configuration
|
||||
VerificationBypass bool `json:"-"`
|
||||
// HasChecksumValidation defines an allowance to bypass internal
|
||||
// verification if the book has been verified by checksum.
|
||||
HasChecksumValidation bool `json:"-"`
|
||||
|
||||
Reference in New Issue
Block a user