When testing a transaction for mempool acceptance, the fee must be calculated anyway. Thus, with minimal complexity overhead, the testmempoolaccept RPC could return the fee to the user.

#### Useful skills:

Basic understanding of the mempool, the Bitcoin Core RPC interface, and the functional test framework.

#### Want to work on this issue?

The purpose of the `good first issue` label is to highlight which issues are suitable for a new contributor without a deep understanding of the codebase.

You do not need to request permission to start working on this. You are encouraged to comment on the issue if you are planning to work on it. This will help other contributors monitor which issues are actively being addressed and is also an effective way to request assistance if and when you need it.

For guidance on contributing, please read [CONTRIBUTING.md](https://github.com/bitcoin/bitcoin/blob/master/CONTRIBUTING.md) before opening your pull request.

extern std::atomic_bool fImporting;
extern std::atomic_bool fReindex;
/** Whether there are dedicated script-checking threads running.
 * False indicates all script checking is done on the main threadMessageHandler thread.
 */
extern bool g_parallel_script_checks;
extern bool fRequireStandard;
extern bool fCheckBlockIndex;
extern bool fCheckpointsEnabled;
extern CFeeRate minRelayTxFee;
extern int64_t nMaxTipAge;
extern uint256 hashAssumeValid;
extern arith_uint256 nMinimumChainWork;
extern CBlockIndex *pindexBestHeader;
extern bool fHavePruned;
extern bool fPruneMode;
extern uint64_t nPruneTarget;
extern const std::vector<std::string> CHECKLEVEL_DOC;
FILE* OpenBlockFile(const FlatFilePos &pos, bool fReadOnly = false);
fs::path GetBlockPosFilename(const FlatFilePos &pos);
void LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, FlatFilePos* dbp = nullptr);
bool LoadGenesisBlock(const CChainParams& chainparams);
void UnloadBlockIndex(CTxMemPool* mempool);
void ThreadScriptCheck(int worker_num);
/**
 * Return transaction from the block at block_index.
 * If block_index is not provided, fall back to mempool.
 * If mempool is not provided or the tx couldn't be found in mempool, fall back to g_txindex.
 *
 * @param[in]  block_index     The block to read from disk, or nullptr