def updateBlock(self, oldTuple, newTuple, nameJson):
    file = open((((os.getcwd() + '\\DataJsonBC\\') + nameJson) + '.json'), 'r')
    JSblock_list = json.loads(file.read())
    file.close()
    newHash = self.generate_hash(newTuple)
    for blockJS in JSblock_list:
        if (oldTuple == blockJS[1]):
            blockJS[1] = newTuple
            blockJS[3] = newHash
    for block in self.blocks_list:
        if (oldTuple == block.getData()):
            block.setData(newTuple)
            block.setIdHash(newHash)
    file = open((((os.getcwd() + '\\DataJsonBC\\') + nameJson) + '.json'), 'w+')
    file.write(json.dumps(JSblock_list))
    file.close()
def updateBlock(self, oldTuple, newTuple, nameJson):
    file = open((((os.getcwd() + '\\DataJsonBC\\') + nameJson) + '.json'), 'r')
    JSblock_list = json.loads(file.read())
    file.close()
    newHash = self.generate_hash(newTuple)
    for blockJS in JSblock_list:
        if (oldTuple == blockJS[1]):
            blockJS[1] = newTuple
            blockJS[3] = newHash
    for block in self.blocks_list:
        if (oldTuple == block.getData()):
            block.setData(newTuple)
            block.setIdHash(newHash)
    file = open((((os.getcwd() + '\\DataJsonBC\\') + nameJson) + '.json'), 'w+')
    file.write(json.dumps(JSblock_list))
    file.close()