mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 12:07:17 +00:00
adf52465e3
Useful for minimizing merge conflicts when rebasing new geth
42 lines
926 B
Go
42 lines
926 B
Go
package trie
|
|
|
|
type StatsColumn string
|
|
|
|
const (
|
|
ColumnStructure = StatsColumn("structure")
|
|
ColumnHashes = StatsColumn("hashes")
|
|
ColumnCodes = StatsColumn("codes")
|
|
ColumnLeafKeys = StatsColumn("leaf_keys")
|
|
ColumnLeafValues = StatsColumn("leaf_values")
|
|
ColumnTotal = StatsColumn("total_witness_size")
|
|
)
|
|
|
|
type BlockWitnessStats struct {
|
|
witnessSize uint64
|
|
stats map[StatsColumn]uint64
|
|
}
|
|
|
|
func (s *BlockWitnessStats) BlockWitnessSize() uint64 {
|
|
return s.witnessSize
|
|
}
|
|
|
|
func (s *BlockWitnessStats) CodesSize() uint64 {
|
|
return s.stats[ColumnCodes]
|
|
}
|
|
|
|
func (s *BlockWitnessStats) LeafKeysSize() uint64 {
|
|
return s.stats[ColumnLeafKeys]
|
|
}
|
|
|
|
func (s *BlockWitnessStats) LeafValuesSize() uint64 {
|
|
return s.stats[ColumnLeafValues]
|
|
}
|
|
|
|
func (s *BlockWitnessStats) StructureSize() uint64 {
|
|
return s.stats[ColumnStructure]
|
|
}
|
|
|
|
func (s *BlockWitnessStats) HashesSize() uint64 {
|
|
return s.stats[ColumnHashes]
|
|
}
|