diff options
author | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-02-24 01:39:05 +0800 |
---|---|---|
committer | Paweł Bylica <pawel.bylica@imapp.pl> | 2015-02-24 01:39:05 +0800 |
commit | 114c3b4efe7f30ab7be0bec013210e7b4c3d08d7 (patch) | |
tree | 5230f6fee87dcbac36e1d71d6ab731b55eab8268 /core/error.go | |
parent | b9894c1d0979b9f3e8428b1dc230f1ece106f676 (diff) | |
parent | dd086791acf477da7641c168f82de70ed0b2dca6 (diff) | |
download | dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.gz dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.bz2 dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.lz dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.xz dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.tar.zst dexon-114c3b4efe7f30ab7be0bec013210e7b4c3d08d7.zip |
Merge remote-tracking branch 'upstream/develop' into evmjit
Diffstat (limited to 'core/error.go')
-rw-r--r-- | core/error.go | 23 |
1 files changed, 6 insertions, 17 deletions
diff --git a/core/error.go b/core/error.go index 11d8c1653..e86bacb2d 100644 --- a/core/error.go +++ b/core/error.go @@ -1,10 +1,16 @@ package core import ( + "errors" "fmt" "math/big" ) +var ( + BlockNumberErr = errors.New("block number invalid") + BlockFutureErr = errors.New("block time is in the future") +) + // Parent error. In case a parent is unknown this error will be thrown // by the block manager type ParentErr struct { @@ -62,23 +68,6 @@ func IsValidationErr(err error) bool { return ok } -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} -} - type NonceErr struct { Message string Is, Exp uint64 |