def insertBlock(self, tupla, nameJson):
    id_hash = self.generate_hash(tupla)
    newBlock = Block(self.idChain, tupla, self.previous, id_hash)
    self.blocks_list.append(newBlock)
    file = self.load_json(nameJson)
    file.write(json.dumps([j.getBlock() for j in self.blocks_list]))
    file.close()
    if (self.idChain == 1):
        self.firstHash = id_hash
    self.idChain += 1
    self.previous = id_hash
def insertBlock(self, tupla, nameJson):
    id_hash = self.generate_hash(tupla)
    newBlock = Block(self.idChain, tupla, self.previous, id_hash)
    self.blocks_list.append(newBlock)
    file = self.load_json(nameJson)
    file.write(json.dumps([j.getBlock() for j in self.blocks_list]))
    file.close()
    if (self.idChain == 1):
        self.firstHash = id_hash
    self.idChain += 1
    self.previous = id_hash