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: fix median timestamp index #3349

Merged

Conversation

SWvheerden
Copy link
Collaborator

@SWvheerden SWvheerden commented Sep 15, 2021

Description

The current code will ask for the last 12 block heights and not 11. This code fixes it to only work on the last 11

Motivation and Context

The consensus rules are stated to work on the last 11 blocks and not 12. The current code incorrectly includes a second index.

How Has This Been Tested?

Unit tests

Copy link
Collaborator

@stringhandler stringhandler left a comment

Choose a reason for hiding this comment

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

Technically a breaking change, but unlikely to have an effect in practice

@aviator-app aviator-app bot merged commit 0757e9b into tari-project:development Sep 15, 2021
@SWvheerden SWvheerden deleted the sw_fix_median_timestamp branch September 16, 2021 06:47
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.

None yet

2 participants