[input-output-hk/cardano-sl] [CO-347] Wallet’s UTXO histogram view (#3402)

paweljakubas commented on this pull request.

> +
+
+deriveSafeBuildable »HistogramBar
+instance BuildableSafeGen HistogramBar where
+ buildSafeGen _ HistogramBarCount{..} =
+ bprint («{»
+ %» name=»%build
+ %» upperBound=»%build
+ %» }»)
+ bucketName
+ bucketUpperBound
+
+
+data UtxoStatistics = UtxoStatistics
+ { theHistogram :: ![HistogramBar]
+ , theAllStakes :: !Word64

when computing histogram, in the same traverse I compute allStakes. I can add many more other statistics here in the future. And in one traverse it is going to be computed. Usually there is no easy (nonapproximative) way of going from one aggregation to other