Skip to content
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

Extract #getIndexHash in HashableIndex interface [ECR-4064]. #1366

Merged

Conversation

dmitry-timofeev
Copy link
Contributor

Overview

HashableIndex is similar to ObjectHash trait in MerkleDB.


See: https://jira.bf.local/browse/ECR-4064

Definition of Done

  • There are no TODOs left in the code
  • Change is covered by automated tests
  • The coding guidelines are followed
  • Public API has Javadoc
  • Method preconditions are checked and documented in the Javadoc of the method
  • Changelog is updated if needed (in case of notable or breaking changes)
  • The continuous integration build passes

* @see ProofListIndexProxy#getIndexHash()
* @see ProofMapIndexProxy#getIndexHash()
* @see ProofEntryIndexProxy#getIndexHash()
* @see com.exonum.binding.core.storage.indices.HashableIndex
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The other links are index-specific.

@@ -85,7 +85,8 @@
* @param <V> the type of values in this map
* @see View
*/
public final class ProofMapIndexProxy<K, V> extends AbstractIndexProxy implements MapIndex<K, V> {
public final class ProofMapIndexProxy<K, V> extends AbstractIndexProxy implements MapIndex<K, V>,
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When we make the index factories and add the interfaces for each index type, those interfaces could extend HashableIndex, instead of implementation classes.


/**
* Returns the index hash which represents the complete state of this index.
* Any modifications to the stored entries must affect the index hash.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* Any modifications to the stored entries must affect the index hash.
* Any modifications to the stored entries affects the index hash.

@dmitry-timofeev dmitry-timofeev changed the base branch from add-index-proof-ECR-4011 to master January 17, 2020 09:53
@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.705% when pulling 4020af4 on dmitry-timofeev:add-hashable-index-ECR-4064 into ec6bed2 on exonum:master.

@dmitry-timofeev dmitry-timofeev merged commit 7608a6d into exonum:master Jan 17, 2020
@dmitry-timofeev dmitry-timofeev deleted the add-hashable-index-ECR-4064 branch January 17, 2020 11:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants