I try to concurrently monitor a bunch of signed but non published transactions. I want to detect asap if any of the inputs into these bond transactions have been used in another transaction in my mempool. Available for use is the bitcoin core rpc and bdk/rust bitcoin. IIUC testmempoolaccept only detects if the inputs already have been confirmed in another TX.
The straightforward way i can think of is calling getrawmempool and then getmempoolentry on each transaction, iterating trough the inputs. This can get heavy for a larger mempool.
My question is if there is another possible way to do this in a more (time) efficient manner using either the core rpc or functionality of bdk/rust bitcoin/another rust crate?