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

itest: small fixes for tapd load test #869

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion itest/loadtest/mint_batch_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,5 @@ func mintTest(t *testing.T, ctx context.Context, cfg *Config) {
})
require.True(t, correctOp)

itest.SyncUniverses(ctx, t, alice, bob, aliceHost, cfg.TestTimeout)
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this should actually be bobHost and not aliceHost? IIUC alice is the client trying to sync to bob.

Copy link
Member

Choose a reason for hiding this comment

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

No, I think this is correct. It was wrong before. Bob should be the client that syncs to Alice and for that it needs Alice's host address.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

There may be more than one correct way to set it up. The old mint test used to have bob add alice as a federation server using bob.AddFederationServer(... something <aliceHost> ...), so I was just reverting to that approach. We could probably also get away with having alice add bob as the federation server.

Does the directionality of who adds whom matter? Alice is the node doing all the minting the way the tests are setup now.

Copy link
Member

Choose a reason for hiding this comment

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

Directionality matters, yes. Because a sync currently is only pull. So Bob will fetch everything that Alice has. But if Bob has something that Alice doesn't I don't think that's currently pushed in the other direction.

itest.SyncUniverses(ctx, t, bob, alice, aliceHost, cfg.TestTimeout)
}
2 changes: 1 addition & 1 deletion itest/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func MineBlocks(t *testing.T, client *rpcclient.Client,
var blockHashes []*chainhash.Hash

switch backend.(type) {
case rpcclient.BitcoindVersion:
case *rpcclient.BitcoindVersion:
Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should add a comment here? Otherwise someone looking at this will definitely think one of them is wrong...

Copy link
Member

Choose a reason for hiding this comment

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

aren't both meant to be pointers?

Copy link
Member

Choose a reason for hiding this comment

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

Nope, apparently they're not, which is very weird...

addr, err := btcutil.DecodeAddress(
regtestMiningAddr, regtestParams,
)
Expand Down
Loading