Problem: The mining interface returns one nullable transaction for every requested txid or wtxid so callers can match results by position.
When its NodeContext has no mempool (not sure that's possible, but there's a condition for it which violates the contract), both lookup methods return an empty vector for every nonempty request and discard that positional mapping, see: https://github.com/bitcoin/bitcoin/blob/7b6f9ba7bad13b0c4169259000f7802854cdda0d/src/interfaces/mining.h#L202-L203
Fix: Return a vector sized to the request when no mempool is available. Default-initialized null entries match the existing representation for identifiers absent from an available mempool, so callers receive one response position per request in either state.