Skip to content

202 node reciepts collection #265

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 39 commits into from
Sep 24, 2019
Merged

Conversation

astaphobia
Copy link
Contributor

@astaphobia astaphobia commented Sep 24, 2019

Description

  1. Receipt collection saved as batch_receipt, incoming receipt will store into batch_receipt before the count of batch_receipt collection >= ReceiptBatchMaximum.
  2. Generate Merkle Root from batch_receipt collection and store into merkle_root included root and tree
  3. Batch receipt collection stored into node_receipt if count of it is >= ReceiptBatchMaximum.

Breakdown

  • batch_receipt
  • node_receipt collection stored
  • Fix migration fail

Reference Issue

Close #202
Refered zoobc/zoobc-schema#62

Step to Test (optional)

go test ./...

@astaphobia astaphobia added FEATURE New feature or request CORE core functionalities labels Sep 24, 2019
@astaphobia astaphobia added this to the Sprint 6 milestone Sep 24, 2019
@astaphobia astaphobia self-assigned this Sep 24, 2019
Copy link
Contributor

@iltoga iltoga left a comment

Choose a reason for hiding this comment

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

one comment only, non blocking 👍

)
newLimit := limit
if limit == 0 {
newLimit = uint32(10)
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't be better this to be a constant instead of hardcoded uint32(10)?

Copy link
Contributor Author

@astaphobia astaphobia Sep 24, 2019

Choose a reason for hiding this comment

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

done, i'd use constant.ReceiptBatchMaximum it is uint32 @iltoga in the commit below.

@andy-shi88 andy-shi88 merged commit e2fbe5b into develop Sep 24, 2019
@andy-shi88 andy-shi88 deleted the 202-node-reciepts-collection branch September 24, 2019 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CORE core functionalities FEATURE New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tech: Node Receipt Collection
3 participants