flush_txpool - Monero

Example code for the flush_txpool JSON-RPC method. Complete guide on how to use flush_txpool JSON-RPC in GetBlock Web3 documentation.

This method removes one or more transactions from the node's mempool. It is an administrative operation that affects shared infrastructure.

Parameters

Parameter
Type
Required
Description

txids

array of string

No

Specific transaction hashes to remove. If omitted, flushes the entire pool

Request Example

curl --location --request POST 'https://go.getblock.io/<ACCESS-TOKEN>/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "flush_txpool",
    "params": {
        "txids": [
            "d6e48158472848e6687173a91ae6eebfa3e1d778e65252ee99d7515d63090408"
        ]
    },
    "id": "getblock.io"
}'

Response Example

Response Parameters

Field
Type
Description

result.status

string

OK if the flush completed

Use Cases

  • Local-node management during testing

  • Removing specific stuck transactions on a dedicated node

Error Handling

Status Code
Error Message
Cause

404

Not found

Missing or invalid <ACCESS-TOKEN>

-32602

Invalid params

Request parameters are missing or malformed

429

Too Many Requests

Rate limit exceeded for your plan

Last updated

Was this helpful?