Previously, the Checkers stored pointers that were ambiguously null or not for the Transaction and the Precomputed Data. This PR makes the interface always require a reference to a transaction and to a PrecomputedData and remove ambiguity.
This in turn eliminates some dereferences that were previously not asserted locally, and generally makes the APIs more clear.
This doesn’t reduce the ability to not precompute data as PrecomputedTransactionData has it’s own internal initialization process – if that is desired, an unitialized PrecomputedTransactionData can be used. This PR does not attempt to distinguish places where an unfilled PrecomputedTransactionData could be used – for the most part, these are non performance sensitive signing code paths.
Note that the internal representation for CScriptCheck does not change because there is a need to swap pointers (and not the underlying data). To get rid of the pointers altogether, a reference_wrapper could be used.