Skip to content

Bugfix mempool cache #1141

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 3 commits into from
Sep 10, 2020
Merged

Bugfix mempool cache #1141

merged 3 commits into from
Sep 10, 2020

Conversation

andy-shi88
Copy link
Contributor

Description

fix a few missing point when implementing mempool cache

Breakdown

  • mempool removal on PushBlock
  • backup mempool not reading from database
  • clean mempool cache when expiring
  • optimize fetch mempool information on PushBlock

@andy-shi88 andy-shi88 self-assigned this Sep 8, 2020
@andy-shi88 andy-shi88 marked this pull request as draft September 8, 2020 06:21
@@ -455,6 +456,13 @@ func (bs *BlockService) PushBlock(previousBlock, block *model.Block, broadcast,
return err
}
var transactionIDs = make([]int64, len(block.GetTransactions()))
mempoolMap, err = bs.MempoolService.GetMempoolTransactions()
Copy link
Contributor

Choose a reason for hiding this comment

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

💯

@andy-shi88 andy-shi88 marked this pull request as ready for review September 8, 2020 08:17
@astaphobia
Copy link
Contributor

Don't merge yet

@andy-shi88 andy-shi88 changed the base branch from develop to experimental September 9, 2020 07:35
@sukrawidhyawan sukrawidhyawan merged commit d258ad9 into zoobc:experimental Sep 10, 2020
@andy-shi88 andy-shi88 deleted the bugfix-mempoolCache branch October 7, 2020 20:36
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.

5 participants