Optimisations and fixed a couple of DDOS issues in the miner

This commit is contained in:
obscuren
2015-02-19 22:33:22 +01:00
parent c14071df9d
commit fa4cbad315
15 changed files with 156 additions and 104 deletions

View File

@ -68,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