aboutsummaryrefslogtreecommitdiffstats
path: root/core/error.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-03 23:20:38 +0800
committerobscuren <geffobscura@gmail.com>2015-03-03 23:20:38 +0800
commitc74c07eed19f8a328f47aca7b9e01dcdf8731847 (patch)
treef5c7ed0bdae761d00521f3987bd92497d1d035a2 /core/error.go
parent6518da7c0123168061b97e259e75a39c7f6b1638 (diff)
downloadgo-tangerine-c74c07eed19f8a328f47aca7b9e01dcdf8731847.tar.gz
go-tangerine-c74c07eed19f8a328f47aca7b9e01dcdf8731847.tar.zst
go-tangerine-c74c07eed19f8a328f47aca7b9e01dcdf8731847.zip
Fixed error for invalid transaction
Diffstat (limited to 'core/error.go')
-rw-r--r--core/error.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/core/error.go b/core/error.go
index e86bacb2d..fb1eaed84 100644
--- a/core/error.go
+++ b/core/error.go
@@ -87,6 +87,24 @@ func IsNonceErr(err error) bool {
return ok
}
+type InvalidTxErr struct {
+ Message string
+}
+
+func (err *InvalidTxErr) Error() string {
+ return err.Message
+}
+
+func InvalidTxError(err error) *InvalidTxErr {
+ return &InvalidTxErr{fmt.Sprintf("%v", err)}
+}
+
+func IsInvalidTxErr(err error) bool {
+ _, ok := err.(*InvalidTxErr)
+
+ return ok
+}
+
type OutOfGasErr struct {
Message string
}