Commit Graph

4 Commits

Author SHA1 Message Date
UdjinM6
e0b6988a45
Various fixes and refactoring for Cache*Map classes (#1896)
* CacheMap::Insert should not update existing item, should return `false`

* Use `emplace` operator instead of `[]` to add new items in Cache*Map implementation

* Use prefix cm/cmm for CacheMap/CacheMultiMap maps respectively to distinguish them from each other and from std::map-s

* Avoid excessive processing of already known valid votes

Also prettify debug log output a bit

* Drop nCurrentSize from Cache*Map classes

Use `size()` and `empty()` of std classes instead, they have constant complexity since c++11

* Do not create an explicit iterator if it's never used later (in Cache*Map)

* Do not prune last item in CacheMultiMapInsert when trying to insert a duplicate one
2018-02-06 14:08:43 +03:00
Alexander Block
7765c87e79 Remove nType and nVersion from Dash related serialization code
Also remove bogus "nVersion = this->nVersion" assignments. These were
leftovers from old times.
2018-01-15 06:14:15 +01:00
Holger Schinzel
e1702cd4ec bump copyright notice to 2017 (#1207) 2016-12-20 17:26:45 +04:00
Tim Flynn
c31ba8ba4c New vote tallying implementation (#1135) 2016-11-13 21:52:34 +04:00