code: def add_leaf(self, value, do_hash=False):
          
          self.tree['is_ready'] = False
          self._add_leaf(value, do_hash)
docs: Add a leaf to the tree.
          :param value: hash value (as a Buffer) or hex string
          :param do_hash: whether to hash value