Skip to contents

Removes all unconfirmed transactions from the node's memory pool (mempool). This function is typically used after pausing incoming and mining tasks to reset the mempool state. It requires the node to be paused first with mc_pause(conn, "incoming,mining").

Usage

mc_clear_mempool(conn)

Arguments

conn

A connection object created by mc_connect.

Value

Invisibly returns the RPC result (typically NULL) on success.

See also

mc_pause, mc_resume, mc_get_mempool_info to inspect mempool state.

Examples

if (FALSE) { # \dontrun{
# Pause the node before clearing the mempool
mc_pause(conn, "incoming,mining")
mc_clear_mempool(conn)
mc_resume(conn, "incoming,mining")
} # }