aboutsummaryrefslogtreecommitdiffstats
path: root/core/error.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-06 02:51:25 +0800
committerobscuren <geffobscura@gmail.com>2015-03-06 02:51:25 +0800
commit88ff13c241faff1d58e47f12bd283c112de7225a (patch)
treeb7bd2595ba702c086d8226cca4adaeeee0505bd5 /core/error.go
parentca1093f8485595b34781307eb2b673d0d81d8fb9 (diff)
downloaddexon-88ff13c241faff1d58e47f12bd283c112de7225a.tar
dexon-88ff13c241faff1d58e47f12bd283c112de7225a.tar.gz
dexon-88ff13c241faff1d58e47f12bd283c112de7225a.tar.bz2
dexon-88ff13c241faff1d58e47f12bd283c112de7225a.tar.lz
dexon-88ff13c241faff1d58e47f12bd283c112de7225a.tar.xz
dexon-88ff13c241faff1d58e47f12bd283c112de7225a.tar.zst
dexon-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.go16
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
+}