-
Notifications
You must be signed in to change notification settings - Fork 21
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 send specific receipts (Part 2) #113
Conversation
…est-case-insufficient-gas
…est-case-insufficient-gas
… test-case-send-specific-receipts
…est-case-insufficient-gas
… test-case-send-specific-receipts
amount, err := subnetATeleporterMessenger.CheckRelayerRewardAmount(&bind.CallOpts{}, fundedAddress, mockTokenAddress) | ||
Expect(err).Should(BeNil()) | ||
Expect(amount).Should(Equal(big.NewInt(10))) | ||
|
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.
Can you add an additional step of sending an arbitrary message from Subnet B -> Subnet A? This message will also include the receipts that were explicitly sent in the above steps. We should check that the relayer reward amount is unchanged, even after the receipt is delivered again.
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.
sure. Then, will it cover Test receiving a receipt multiple times has no effect
case?
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.
Yup it will! I pointed it out for completeness here, but that will also cover that test case.
…-specific-receipts
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.
Two nits otherwise LGTM!
tests/send_specific_receipts.go
Outdated
Expect(err).Should(BeNil()) | ||
Expect(amount).Should(Equal(big.NewInt(10))) | ||
|
||
// Send message from Subnet B to Subnet A |
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.
// Send message from Subnet B to Subnet A | |
// Send message from Subnet B to Subnet A to trigger the "regular" method of delivering receipts. | |
// The next message from B->A will contain the same receipts that were manually sent in the above steps, | |
// but they should not be processed again on Subnet A. |
tests/send_specific_receipts.go
Outdated
DestinationAddress: fundedAddress, | ||
FeeInfo: teleportermessenger.TeleporterFeeInfo{ | ||
ContractAddress: mockTokenAddress, | ||
Amount: big.NewInt(5), |
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.
Can you replace thi and big.NetInt(10)
below with variables? E.g. relayerFeePerMessage
and totalAccumulatedRelayerFee
Why this should be merged
Implements the following test cases from #94
How this works
See above
How this was tested
New E2E test cases
How is this documented