code: func blockDetails(block *btcutil.Block, txIndex int) *btcjson.BlockDetails {
  	if block == nil {
  		return nil
  	}
  	return &btcjson.BlockDetails{
  		Height: block.Height(),
  		Hash:   block.Hash().String(),
  		Index:  txIndex,
  		Time:   block.MsgBlock().Header.Timestamp.Unix(),
  	}
  }
docs: // blockDetails creates a BlockDetails struct to include in btcws notifications
  // from a block and a transaction's block index.