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.

/**
 * A convenience class for constructing the CCoinsView* hierarchy used
 * to facilitate access to the UTXO set.
 *
 * This class consists of an arrangement of layered CCoinsView objects,
 * preferring to store and retrieve coins in memory via `m_cacheview` but
 * ultimately falling back on cache misses to the canonical store of UTXOs on
 * disk, `m_dbview`.
 */
class CoinsViews {
public:
    
    
    CCoinsViewDB m_dbview GUARDED_BY(cs_main);
    
    CCoinsViewErrorCatcher m_catcherview GUARDED_BY(cs_main);
    
    
    std::unique_ptr<CCoinsViewCache> m_cacheview GUARDED_BY(cs_main);
    
    
    
    
    
    
    CoinsViews(std::string ldb_name, size_t cache_size_bytes, bool in_memory, bool should_wipe);
    
    void InitCache() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
};
enum class CoinsCacheSizeState