-
Notifications
You must be signed in to change notification settings - Fork 1
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
Store future notarization message #100
Conversation
094f45f
to
654b689
Compare
epoch_test.go
Outdated
bb := &testBlockBuilder{out: make(chan *testBlock, 2), in: make(chan *testBlock, 1)} | ||
|
||
nodes := []NodeID{{1}, {2}, {3}, {4}} | ||
|
||
// Create the two blocks ahead of time | ||
blocks := createBlocks(t, nodes, bb, 2) | ||
|
||
firstBlock := blocks[0].Block.(*testBlock) | ||
secondBlock := blocks[1].Block.(*testBlock) | ||
|
||
// re-create the block builder | ||
bb = &testBlockBuilder{out: make(chan *testBlock, 1), in: make(chan *testBlock, 1)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be simpler to do something like this?
bb := &testBlockBuilder{out: make(chan *testBlock, 2), in: make(chan *testBlock, 1)} | |
nodes := []NodeID{{1}, {2}, {3}, {4}} | |
// Create the two blocks ahead of time | |
blocks := createBlocks(t, nodes, bb, 2) | |
firstBlock := blocks[0].Block.(*testBlock) | |
secondBlock := blocks[1].Block.(*testBlock) | |
// re-create the block builder | |
bb = &testBlockBuilder{out: make(chan *testBlock, 1), in: make(chan *testBlock, 1)} | |
bb := &testBlockBuilder{} | |
nodes := []NodeID{{1}, {2}, {3}, {4}} | |
// Create the two blocks ahead of time | |
blocks := createBlocks(t, nodes, bb, 2) | |
firstBlock := blocks[0].Block.(*testBlock) | |
secondBlock := blocks[1].Block.(*testBlock) | |
bb.out = make(chan *testBlock, 1) | |
bb.in = make(chan *testBlock, 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
epoch_test.go
Outdated
injectTestFinalization(t, e, secondBlock, nodes[i]) | ||
} | ||
|
||
storage.waitForBlockCommit(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might as well assert the block
returned here is as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
654b689
to
5f0d461
Compare
We may receive a notarization message for a future round, and in that case - when we move to that round and finish verifying the proposal, we can just use it to advance to the next round. Signed-off-by: Yacov Manevich <[email protected]>
5f0d461
to
db223b6
Compare
We may receive a notarization message for a future round, and in that case - when we move to that round and finish verifying the proposal, we can just use it to advance to the next round.