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

fix(core): fetch_header_containing_*_mmr functions now take a 0-based mmr position #3749

Merged
merged 2 commits into from
Jan 31, 2022

Conversation

sdbondi
Copy link
Member

@sdbondi sdbondi commented Jan 26, 2022

Description

  • fetch_header_containing_kernel_mmr and fetch_header_containing_utxo_mmr take a position starting from 0 inline with the mmr counts in the headers
  • Updated calls (remove the + 1)
  • Updated tests

Motivation and Context

The caller expects the position to be 0-based (e.g Iterator::position returns an index to the found element), the + 1 added to calls were used to account for this bug in the lmdb blockchain backend impl

How Has This Been Tested?

Updated unit tests, manual horizon sync

Copy link
Contributor

@delta1 delta1 left a comment

Choose a reason for hiding this comment

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

Nice one, definite improvement

@aviator-app aviator-app bot merged commit f5b72d9 into tari-project:development Jan 31, 2022
@sdbondi sdbondi deleted the core-fetch-mmr-offset branch February 1, 2022 03:06
sdbondi added a commit to sdbondi/tari that referenced this pull request Feb 1, 2022
* development:
  chore: check genesis block during startup (tari-project#3776)
  chore: fix lint again (tari-project#3780)
  fix(core): fetch_header_containing_*_mmr functions now take a 0-based mmr position (tari-project#3749)
  refactor(test_faucet): include create_utxo to avoid unintentionally breaking faucet utxos (tari-project#3771)
  fix: text explorer show sha-3 correctly + minor fixes (tari-project#3779)
  feat: prevent ambiguous output features in transaction protocols (tari-project#3765)
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.

3 participants