Skip to content

Commit

Permalink
Merge pull request #173 from nspcc-dev/fix-mempool-oom
Browse files Browse the repository at this point in the history
cmd: fix mempool OOM error detection for NeoGo node
  • Loading branch information
AnnaShaleva authored May 16, 2024
2 parents 7ee7f71 + 3fa400b commit b0d351e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .docker/build/Dockerfile.golang
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ WORKDIR /neo-go
# Install deps:
RUN apk add --no-cache git

ARG REV="v0.104.0"
ARG REV="v0.105.1"
ARG REPO="github.com/nspcc-dev/neo-go"

# Clone and build repo:
Expand Down
2 changes: 1 addition & 1 deletion cmd/internal/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func (c *RPCClient) SendTX(ctx context.Context, tx string) error {

if err := c.doRPCCall(ctx, rpc, &res, c.txSender); err != nil {
msg := err.Error()
if strings.Contains(msg, "The memory pool is full and no more transactions can be sent.") || strings.Contains(msg, "OutOfMemory") {
if errors.Is(err, neorpc.ErrMempoolCapReached) || strings.Contains(msg, "OutOfMemory") {
return ErrMempoolOOM
}
return err
Expand Down

0 comments on commit b0d351e

Please sign in to comment.