code: func (h *blockHeaderStore) RollbackLastBlock() (*waddrmgr.BlockStamp, error) {
  	// Lock store for write.
  	h.mtx.Lock()
  	defer h.mtx.Unlock()
  
  	// First, we'll obtain the latest height that the index knows of.
  	_, chainTipHeight, err := h.chainTip()
  	if err != nil {
  		return nil, err
  	}
  
  	// With this height obtained, we'll use it to read the latest header
  	// from disk, so we can populate our return value which requires the
  	// prev header hash.
  	bestHeader, err := h.readHeader(chainTipHeight)
  	if err != nil {
  		return nil, err
  	}
  	prevHeaderHash := bestHeader.PrevBlock
  
  	// Now that we have the information we need to return from this
  	// function, we can now truncate the header file, and then use the hash
  	// of the prevHeader to set the proper index chain tip.
  	if err := h.singleTruncate(); err != nil {
  		return nil, err
  	}
  	if err := h.truncateIndex(&prevHeaderHash, true); err != nil {
  		return nil, err
  	}
  
  	return &waddrmgr.BlockStamp{
  		Height: int32(chainTipHeight) - 1,
  		Hash:   prevHeaderHash,
  	}, nil
  }
docs: // RollbackLastBlock rollsback both the index, and on-disk header file by a
  // _single_ header. This method is meant to be used in the case of re-org which
  // disconnects the latest block header from the end of the main chain. The
  // information about the new header tip after truncation is returned.
  //
  // NOTE: Part of the BlockHeaderStore interface.