Merge pull request #2199 from nspcc-dev/conflicts-message
Reword some error messages
This commit is contained in:
commit
0ddc7be74d
2 changed files with 4 additions and 1 deletions
|
@ -22,7 +22,7 @@ var (
|
|||
// ErrConflict is returned when transaction being added is incompatible
|
||||
// with the contents of the memory pool (Sender doesn't have enough GAS
|
||||
// to pay for all transactions in the pool).
|
||||
ErrConflict = errors.New("conflicts with the memory pool")
|
||||
ErrConflict = errors.New("conflicts: insufficient funds for all pooled tx")
|
||||
// ErrDup is returned when transaction being added is already present
|
||||
// in the memory pool.
|
||||
ErrDup = errors.New("already in the memory pool")
|
||||
|
|
|
@ -90,6 +90,9 @@ func NewSubmitError(code int64, message string) *Error {
|
|||
|
||||
// Error implements the error interface.
|
||||
func (e *Error) Error() string {
|
||||
if e.Cause == nil {
|
||||
return fmt.Sprintf("%s (%d) - %s", e.Message, e.Code, e.Data)
|
||||
}
|
||||
return fmt.Sprintf("%s (%d) - %s - %s", e.Message, e.Code, e.Data, e.Cause)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue