     return transactionResponse
   }
 
-  func fetchBlockWithHash(hash: NSData) -> Block? {
-    let inventoryVector = InventoryVector(type: .Block, hash: hash)
-    getDataMessage = GetDataMessage(inventoryVectors: [inventoryVector])
+  func fetchBlockWithHash(hash: NSData) -> BlockHeader? {
+    getHeadersMessage = GetHeadersMessage(protocolVersion: 1, blockLocatorHashes: [hash])
     let connection = connect()
     waitWithTimeout(30)
     connection.disconnect()


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

  let queue = NSOperationQueue()
  let semaphore = dispatch_semaphore_create(0)
  var getDataMessage: GetDataMessage?
  var getHeadersMessage: GetHeadersMessage?
  var transactionResponse: Transaction?
  var blockResponse: BlockHeader?

  func fetchTransactionWithHash(hash: NSData) -> Transaction? {
    let inventoryVector = InventoryVector(type: .Transaction, hash: hash)
