code: func (b *BlockChain) maybeUpgradeDbBuckets(interrupt <-chan struct{}) error {
  	// Load or create bucket versions as needed.
  	var utxoSetVersion uint32
  	err := b.db.Update(func(dbTx database.Tx) error {
  		// Load the utxo set version from the database or create it and
  		// initialize it to version 1 if it doesn't exist.
  		var err error
  		utxoSetVersion, err = dbFetchOrCreateVersion(dbTx,
  			utxoSetVersionKeyName, 1)
  		return err
  	})
  	if err != nil {
  		return err
  	}
  
  	// Update the utxo set to v2 if needed.
  	if utxoSetVersion < 2 {
  		if err := upgradeUtxoSetToV2(b.db, interrupt); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // maybeUpgradeDbBuckets checks the database version of the buckets used by this
  // package and performs any needed upgrades to bring them to the latest version.
  //
  // All buckets used by this package are guaranteed to be the latest version if
  // this function returns without error.