Check that tx_relay is initialized before access
Summary: This is a partial backport of Core PR15759 : https://github.com/bitcoin/bitcoin/pull/15759/commits/e75c39cd425f8c4e5b6bbb2beecb9c80034fefe1
Test Plan:
ninja all check-all
Reviewers: #bitcoin_abc, majcosta
Reviewed By: #bitcoin_abc, majcosta
Differential Revision: https://reviews.bitcoinabc.org/D6426