Skip to content

Add GetTotalItems in CacheStorageInterface & GetBlockByHeightCacheFormat in Blocks Service #1341

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Nov 11, 2020
Merged

Add GetTotalItems in CacheStorageInterface & GetBlockByHeightCacheFormat in Blocks Service #1341

merged 6 commits into from
Nov 11, 2020

Conversation

sukrawidhyawan
Copy link
Contributor

@sukrawidhyawan sukrawidhyawan commented Nov 10, 2020

Description

Based on profiling when spam transaction, need to Implement more about blocks storage & add GetTotalItems to return the number of total items of storage. Change the type of referenceBlock of GenerateReceipt, from *model.Blocks to *storage.BlockCacheObject.

Breakdown

  • Add GetTotalItems in CacheStorageInterface
  • Add GetBlockByHeightCacheFormat in BlockServiceInterface
  • Change referenceBlock GenerateReceipt to *storage.BlockCacheObject

Reference Issue

Close #1340

Step to Test (optional)

run multiple local nodes

Copy link
Contributor

@astaphobia astaphobia left a comment

Choose a reason for hiding this comment

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

And need to add Read locking for the safe way when cache*.GetTotalItems

@astaphobia astaphobia merged commit 5fc9acc into zoobc:experimental Nov 11, 2020
@astaphobia astaphobia deleted the cache-implementMore branch November 11, 2020 02:45
@abiman7u abiman7u added this to the Milestone 20 milestone Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants