Implement eth_pendingTransactions, bump sdk version (#124)

* Update sdk version, implement pending txs, fix nonce check

* Bump cached dependencies in circleCI

* bump circleci go version

* updated linter and fixed bugs relating to go version 1.13
This commit is contained in:
Austin Abell
2019-10-19 08:23:09 +09:00
committed by GitHub
parent 9802cbc98e
commit 160e82b2ad
11 changed files with 210 additions and 78 deletions
+9 -9
View File
@@ -9,11 +9,11 @@ const (
// DefaultCodespace reserves a Codespace for Ethermint.
DefaultCodespace sdk.CodespaceType = "ethermint"
CodeInvalidValue sdk.CodeType = 1
CodeInvalidChainID sdk.CodeType = 2
CodeInvalidSender sdk.CodeType = 3
CodeVMExecution sdk.CodeType = 4
CodeInvalidIntrinsicGas sdk.CodeType = 5
CodeInvalidValue sdk.CodeType = 1
CodeInvalidChainID sdk.CodeType = 2
CodeInvalidSender sdk.CodeType = 3
CodeVMExecution sdk.CodeType = 4
CodeInvalidNonce sdk.CodeType = 5
)
// CodeToDefaultMsg takes the CodeType variable and returns the error string
@@ -27,8 +27,8 @@ func CodeToDefaultMsg(code sdk.CodeType) string {
return "could not derive sender from transaction"
case CodeVMExecution:
return "error while executing evm transaction"
case CodeInvalidIntrinsicGas:
return "invalid intrinsic gas"
case CodeInvalidNonce:
return "invalid nonce"
default:
return sdk.CodeToDefaultMsg(code)
}
@@ -55,6 +55,6 @@ func ErrVMExecution(msg string) sdk.Error {
}
// ErrVMExecution returns a standardized SDK error resulting from an error in EVM execution.
func ErrInvalidIntrinsicGas(msg string) sdk.Error {
return sdk.NewError(DefaultCodespace, CodeInvalidIntrinsicGas, msg)
func ErrInvalidNonce(msg string) sdk.Error {
return sdk.NewError(DefaultCodespace, CodeInvalidNonce, msg)
}