diff options
Diffstat (limited to 'core/error.go')
-rw-r--r-- | core/error.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/error.go b/core/error.go index 09eea22d6..ff58d69d6 100644 --- a/core/error.go +++ b/core/error.go @@ -177,3 +177,14 @@ func IsValueTransferErr(e error) bool { _, ok := e.(*ValueTransferError) return ok } + +type BadHashError common.Hash + +func (h BadHashError) Error() string { + return fmt.Sprintf("Found known bad hash in chain %x", h) +} + +func IsBadHashError(err error) bool { + _, ok := err.(BadHashError) + return ok +} |