We consider a spectrum-sensing opportunistic wireless relay network which is defined by a source node, a destination node, and a group of network clusters each of which consists of a number of cognitive (unlicensed) relay nodes and a primary (licensed) node. In this network, the cognitive nodes can help the source node via a number of possible relaying techniques in an opportunistic fashion, i.e., by acquiring unused spectrum nominally assigned to a primary node. We aim to understand the performance of this system by investigating the impact of spectrum acquisition on the diversity order provided by the cognitive relay nodes. We consider three relay transmission schemes, namely, regenerative decode-and-forward, non-regenerative decode-and-forward and amplify-and-forward under fairly general channel conditions. We find that, regardless of the relay transmission scheme used, the imperfections that may arise during acquisition of the spectrum by the cognitive nodes can cause a significant reduction in diversity order. The good news is that this penalty can be compensated for if a sufficient number of potential relay nodes within a cluster cooperatively sense the spectrum and help the designated cognitive relay node.