mirror of
https://github.com/alexgo-io/gaze-indexer.git
synced 2026-01-12 22:43:22 +08:00
fix: handle block timeout = 0
This commit is contained in:
@@ -70,6 +70,11 @@ func (v *PurchaseValidator) WithinTimeoutBlock(timeOutBlock uint64, blockHeight
|
||||
if !v.Valid {
|
||||
return false
|
||||
}
|
||||
if timeOutBlock == 0 {
|
||||
// No timeout
|
||||
v.Valid = true
|
||||
return v.Valid
|
||||
}
|
||||
if timeOutBlock < blockHeight {
|
||||
v.Valid = false
|
||||
v.Reason = BLOCK_HEIGHT_TIMEOUT
|
||||
|
||||
Reference in New Issue
Block a user