   let queue = NSOperationQueue()
   let semaphore = dispatch_semaphore_create(0)
   var getDataMessage: GetDataMessage?
+  var getHeadersMessage: GetHeadersMessage?
   var transactionResponse: Transaction?
-  var blockResponse: Block?
+  var blockResponse: BlockHeader?
 
   func fetchTransactionWithHash(hash: NSData) -> Transaction? {
     let inventoryVector = InventoryVector(type: .Transaction, hash: hash)


  func peerConnection(peerConnection: PeerConnection,
                      didConnectWithPeerVersion peerVersion: VersionMessage) {
    if let message = getDataMessage {
      peerConnection.sendMessageWithPayload(message)
    }
  }

    return transactionResponse
  }

  func fetchBlockWithHash(hash: NSData) -> BlockHeader? {
    getHeadersMessage = GetHeadersMessage(protocolVersion: 1, blockLocatorHashes: [hash])
    let connection = connect()
    waitWithTimeout(30)
    connection.disconnect()
