def on_headers(self, message):
    self.block_announced = True
    for x in self.last_message['headers'].headers:
        x.calc_sha256()
        self.announced_blockhashes.add(x.sha256)
def on_headers(self, message):
    self.block_announced = True
    for x in self.last_message['headers'].headers:
        x.calc_sha256()
        self.announced_blockhashes.add(x.sha256)