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

Implements deadline tests and chain epoch update to i64 #533

Merged
merged 25 commits into from
Jul 6, 2020

Conversation

dutterbutter
Copy link
Contributor

Summary of changes
Changes introduced in this pull request:

  • Ports over deadline tests from deadline_tests.go;
  • Changes ChainEpoch from u64 to i64
  • Removes OptionalEpoch type

Reference issue to close (if applicable)

Closes #495

Other information and links

vm/actor/src/builtin/market/state.rs Outdated Show resolved Hide resolved
vm/actor/src/builtin/market/mod.rs Outdated Show resolved Hide resolved
vm/actor/src/builtin/miner/state.rs Outdated Show resolved Hide resolved
vm/actor/src/builtin/miner/state.rs Outdated Show resolved Hide resolved
vm/actor/src/builtin/power/state.rs Show resolved Hide resolved
vm/actor/tests/deadline_test.rs Outdated Show resolved Hide resolved
vm/actor/tests/deadline_test.rs Outdated Show resolved Hide resolved
vm/actor/tests/deadline_test.rs Outdated Show resolved Hide resolved
vm/actor/tests/deadline_test.rs Outdated Show resolved Hide resolved
vm/actor/tests/deadline_test.rs Outdated Show resolved Hide resolved
node/clock/src/lib.rs Show resolved Hide resolved
vm/actor/tests/deadline_test.rs Show resolved Hide resolved
dls.due[3] = bf_seq(3 * PART_SIZE + 1, 1);
dls.due[5] = bf_seq(3 * PART_SIZE + 2, 2 * PART_SIZE);

compute_partitions_sector(&mut dls, PART_SIZE as u64, 1, &[4]).unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

wouldnt this just panic on the first one and end the test?

Copy link
Contributor

Choose a reason for hiding this comment

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

yeah just assert each are an error or none (I missed the should panic)

.add_to(5, 3)
.verify(&deadlines);

// fill less full deadlines first
Copy link
Member

Choose a reason for hiding this comment

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

in spec-actors, they have this as a seperate test case

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Does that make a difference or is it just preference?

Copy link
Member

Choose a reason for hiding this comment

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

I mean its not a BIG deal, but they two different test cases.

@ec2
Copy link
Member

ec2 commented Jul 3, 2020

@dutterbutter dutterbutter requested a review from ec2 July 6, 2020 14:34
@dutterbutter dutterbutter merged commit 250ad1b into main Jul 6, 2020
@dutterbutter dutterbutter deleted the dustin/chainepoch-signed branch July 6, 2020 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

implement deadlines test for miner actor
3 participants