diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-23 23:59:09 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-23 23:59:09 +0800 |
commit | 0330077d76b48934ab024a309000f83c78047d8a (patch) | |
tree | 2a3ffbcd5bd941b30ed28d0eb5c30553a25324e0 /core/state/errors.go | |
parent | d7eaa97a297151637af090ecb05bbd6d260d90b8 (diff) | |
download | go-tangerine-0330077d76b48934ab024a309000f83c78047d8a.tar go-tangerine-0330077d76b48934ab024a309000f83c78047d8a.tar.gz go-tangerine-0330077d76b48934ab024a309000f83c78047d8a.tar.bz2 go-tangerine-0330077d76b48934ab024a309000f83c78047d8a.tar.lz go-tangerine-0330077d76b48934ab024a309000f83c78047d8a.tar.xz go-tangerine-0330077d76b48934ab024a309000f83c78047d8a.tar.zst go-tangerine-0330077d76b48934ab024a309000f83c78047d8a.zip |
moved state and vm to core
Diffstat (limited to 'core/state/errors.go')
-rw-r--r-- | core/state/errors.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/core/state/errors.go b/core/state/errors.go new file mode 100644 index 000000000..5a847d38b --- /dev/null +++ b/core/state/errors.go @@ -0,0 +1,23 @@ +package state + +import ( + "fmt" + "math/big" +) + +type GasLimitErr struct { + Message string + Is, Max *big.Int +} + +func IsGasLimitErr(err error) bool { + _, ok := err.(*GasLimitErr) + + return ok +} +func (err *GasLimitErr) Error() string { + return err.Message +} +func GasLimitError(is, max *big.Int) *GasLimitErr { + return &GasLimitErr{Message: fmt.Sprintf("GasLimit error. Max %s, transaction would take it to %s", max, is), Is: is, Max: max} +} |