-
Notifications
You must be signed in to change notification settings - Fork 973
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
test(swamp): pruning FN blob sync #3464
Conversation
// spin up 3 pruning FNs, connect | ||
// spin up 1 LN that syncs historic blobs | ||
// | ||
// Steps: |
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.
Added step numbers to follow in the test code.
@@ -64,11 +73,7 @@ func TestArchivalBlobSync(t *testing.T) { | |||
fx.Replace(testAvailWindow), | |||
) | |||
|
|||
// stop the archival BN to force LN to have to discover |
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.
Moved this higher where it should be.
@@ -77,10 +82,12 @@ func TestArchivalBlobSync(t *testing.T) { | |||
err = archivalFN.Host.Connect(ctx, *host.InfoFromHost(pruningBN.Host)) | |||
require.NoError(t, err) | |||
|
|||
// step 5. | |||
const numFNs = 3 |
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.
Extracted as a const.
i := 1 | ||
for { | ||
|
||
for i := 1; len(archivalBlobs) < wantBlobs; i++ { |
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.
We just need to collect wantBlobs
here, i
is a simple increment that can be done in a loop declaration.
|
||
// Pruning_FN from only archival_FN. | ||
// | ||
// Steps: |
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.
Not sure should there be more steps to verify all logic paths 🤷
|
||
require.NoError(t, <-fillDn) | ||
|
||
type archivalBlob struct { |
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.
Probably this can be named as a separate step.
💀 |
Updates #3444