aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm/error.go
diff options
context:
space:
mode:
authorStephen Buttolph <[email protected]>2020-08-25 13:49:24 -0400
committerGitHub <[email protected]>2020-08-25 13:49:24 -0400
commit5f9c76b5f4eb5bb08b8d3e3125b223f3737631d3 (patch)
tree9de0af77831340eb38c28c613849f1e7b65f3a54 /plugin/evm/error.go
parent1bb314f767785fe617c3c5efeca1a64127339506 (diff)
parentb05d11d451fb73843abcf6bd5fc8664b069433a4 (diff)
Merge pull request #11 from ava-labs/TS_fix_gasv0.2.13
Fix gas handling
Diffstat (limited to 'plugin/evm/error.go')
-rw-r--r--plugin/evm/error.go19
1 files changed, 19 insertions, 0 deletions
diff --git a/plugin/evm/error.go b/plugin/evm/error.go
new file mode 100644
index 0000000..0554349
--- /dev/null
+++ b/plugin/evm/error.go
@@ -0,0 +1,19 @@
+// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
+// See the file LICENSE for licensing terms.
+
+package evm
+
+// TxError provides the ability for errors to be distinguished as permenant or
+// temporary
+type TxError interface {
+ error
+ Temporary() bool
+}
+
+type tempError struct{ error }
+
+func (tempError) Temporary() bool { return true }
+
+type permError struct{ error }
+
+func (permError) Temporary() bool { return false }