Checking if transaction is RBF
The getrawmempool RPC command, in verbose mode, produces an output that contains all known mempool transactions for your nodes. This output contains a bip125-replaceable boolean field which you can use to determine if a tx is explicitly or implicitly replaceable by fee.