Updating sync logic in HashTree