Skip to content

fixes #388: cache cfund votes and add bench log#390

Merged
proletesseract merged 2 commits into
navcoin:masterfrom
aguycalled:fix-slow-sync
Jan 10, 2019
Merged

fixes #388: cache cfund votes and add bench log#390
proletesseract merged 2 commits into
navcoin:masterfrom
aguycalled:fix-slow-sync

Conversation

@aguycalled
Copy link
Copy Markdown
Member

Solves #388.

Keeps a cache of the community fund votes to avoid an unnecessary recalculation per block which was causing extreme slow synchronization in the order of 0,25-0,3s per block.

After applying the patch the CountVotes() function takes an average of 32ms.

@marcus290
Copy link
Copy Markdown
Contributor

@aguycalled @matt-auckland I'm getting a mismatch between the no. of votes shown with listproposals and cfundstats, where listproposals is showing much fewer votes. Do you get the same thing?

The sync is much faster indeed.

@aguycalled
Copy link
Copy Markdown
Member Author

good catch. committed f1154b4

@proletesseract
Copy link
Copy Markdown
Member

The sync speed is good. I'm getting through a few hundred blocks per second or more.

@marcus290 I'll leave it to you to confirm if you're happy with the fix for the votes stats.

Copy link
Copy Markdown
Contributor

@marcus290 marcus290 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vote counts match now

@aguycalled
Copy link
Copy Markdown
Member Author

can we merge this?

@proletesseract proletesseract merged commit 1990d92 into navcoin:master Jan 10, 2019
@matt-auckland matt-auckland added this to the 4.5.2 milestone Jan 31, 2019
aguycalled pushed a commit to skreener/navcoin-core that referenced this pull request Feb 3, 2019
fixes navcoin#388: cache cfund votes and add bench log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants