diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-06 02:51:25 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-06 02:51:25 +0800 |
commit | 88ff13c241faff1d58e47f12bd283c112de7225a (patch) | |
tree | b7bd2595ba702c086d8226cca4adaeeee0505bd5 /core/error.go | |
parent | ca1093f8485595b34781307eb2b673d0d81d8fb9 (diff) | |
download | go-tangerine-88ff13c241faff1d58e47f12bd283c112de7225a.tar go-tangerine-88ff13c241faff1d58e47f12bd283c112de7225a.tar.gz go-tangerine-88ff13c241faff1d58e47f12bd283c112de7225a.tar.bz2 go-tangerine-88ff13c241faff1d58e47f12bd283c112de7225a.tar.lz go-tangerine-88ff13c241faff1d58e47f12bd283c112de7225a.tar.xz go-tangerine-88ff13c241faff1d58e47f12bd283c112de7225a.tar.zst go-tangerine-88ff13c241faff1d58e47f12bd283c112de7225a.zip |
Spec changes.
* All errors during state transition result in an invalid tx
Diffstat (limited to 'core/error.go')
-rw-r--r-- | core/error.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/core/error.go b/core/error.go index 514cd076b..04e40646c 100644 --- a/core/error.go +++ b/core/error.go @@ -146,3 +146,19 @@ func IsKnownBlockErr(e error) bool { _, ok := e.(*KnownBlockError) return ok } + +type ValueTransferError struct { + message string +} + +func ValueTransferErr(str string, v ...interface{}) *ValueTransferError { + return &ValueTransferError{fmt.Sprintf(str, v...)} +} + +func (self *ValueTransferError) Error() string { + return self.message +} +func IsValueTransferErr(e error) bool { + _, ok := e.(*ValueTransferError) + return ok +} |