Skip to content

cleanup weird edge_bits handling in tests#3316

Merged
antiochp merged 1 commit into
mimblewimble:masterfrom
antiochp:chain_test_edge_bits_cleanup
May 4, 2020
Merged

cleanup weird edge_bits handling in tests#3316
antiochp merged 1 commit into
mimblewimble:masterfrom
antiochp:chain_test_edge_bits_cleanup

Conversation

@antiochp
Copy link
Copy Markdown
Member

@antiochp antiochp commented May 3, 2020

Looks like some legacy refactoring left some conditional stuff in place that no longer makes any sense.

This PR simply cleans this up. All chain tests still pass.

@antiochp antiochp changed the title cleanup weird egde_bits handling in tests cleanup weird edge_bits handling in tests May 3, 2020
edge_bits,
)
.unwrap();
b.header.pow.proof.edge_bits = edge_bits;
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This is redundant as we already set this earlier.


chain.set_txhashset_roots(&mut b).unwrap();

let edge_bits = if n == 2 {
Copy link
Copy Markdown
Member Author

@antiochp antiochp May 3, 2020

Choose a reason for hiding this comment

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

n here is block height and not sure why we would need special handling for height 2.

In fact this is actually a relative height as we may run this code multiple times in a test (n is how many additional blocks to mine).

@antiochp antiochp merged commit c82199b into mimblewimble:master May 4, 2020
@antiochp antiochp deleted the chain_test_edge_bits_cleanup branch May 4, 2020 11:40
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.

2 participants