Taken from: https://github.com/bitcoin/bitcoin/pull/34020#issuecomment-3624001654
Let applications override CustomHasField so they can decide to treat certain capnproto values as being unset. For example, when converting List(Data) to vector<shared_ptr<CTransaction>>, mapping empty Data fields to null pointers.
This safe to do in special cases, like in this example because serialized CTransaction representations are never empty. It is also useful to do in this case because Cap’n Proto doesn’t currently provide any API for distinguishing between unset and empty data values in a list (although they can be distinguished on the wire).