aboutsummaryrefslogtreecommitdiffstats
path: root/core/test/utils.go
Commit message (Collapse)AuthorAgeFilesLines
* core: tune performance (#73)Mission Liao2018-08-281-0/+26
| | | | | | | | | | | | | | | | | | | | | | - Avoid using recursive function in critical path. - Do not write through when using levelDB. Things put to levelDB would be safe from panic even we didn't force to write through every time. - Dump count of confirmed blocks proposed by self. - Avoid allocating variables in loop. - Return length of acking node set, we only need that when total ordering. - Fix potential bug: make sure win records updated when acking height vectors of candidates are changed. - Keep dirty validators in slice. - Add cache for objects to ease the pressure to garbage collector. - Cache global acking status when total ordering. - Add method to recycle blocks. - Marshal JSON should be called once for each broadcast. - Make updateWinRecord called in parallel. - Log average / deviation of latencies when simulation finished.
* test: refine test utility (#61)Mission Liao2018-08-151-0/+9
| | | | | * Add functionality to test.App * Add test utility to generate slices of types.ValidatorID
* core: Hash block in Consensus.PrepareBlock. (#46)Jimmy Hu2018-08-121-0/+31
* Add hash to block * Check block hash in Consensus.sanityCheck * Add hashBlockFn in block generator.go