Replaced to return the td and throw a specific error on TD
This commit is contained in:
@ -114,3 +114,15 @@ func IsOutOfGasErr(err error) bool {
|
||||
|
||||
return ok
|
||||
}
|
||||
|
||||
type TDError struct {
|
||||
a, b *big.Int
|
||||
}
|
||||
|
||||
func (self *TDError) Error() string {
|
||||
return fmt.Sprintf("incoming chain has a lower or equal TD (%v <= %v)", self.a, self.b)
|
||||
}
|
||||
func IsTDError(e error) bool {
|
||||
_, ok := err.(*TDError)
|
||||
return ok
|
||||
}
|
||||
|
Reference in New Issue
Block a user