-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Expose CheckAttempt to TxManager, saves some unnecessary calls #1327
Merged
j16r
merged 13 commits into
master
from
chore/eth_tx_adapter_initial_tx_creation_attempt_and_attempt_checking
Jun 8, 2019
Merged
Changes from 12 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
1c6bc22
Expose CheckAttempt to TxManager, saves some unnecessary calls
j16r fc6ac9e
Handle state detection and manipulation separately in gas bumping
j16r de522de
Check on receipt, rather than state, avoid nil ptr dereference
j16r ba12f49
Remove redundant eth_blockNumber calls, only Safe completes EthTx
j16r dec936f
Add a full test for CheckAttempt
j16r 5499a9b
Add test for error case of CheckAttempt
j16r 27b9d36
Don't special case receipt return, if we get it, return it
j16r 3c1c2f2
NonceManagement_firstRunWithExistingTxs fixed
j16r 61cae6c
BumpGasUntilSafe returns state
j16r 613c544
Test to distinguish between recoverable/fatal errors in BumpGasUntilSafe
j16r 0529ba5
Add AssertAllCalled which immediately checks all EthMock calls were made
j16r 32e57ce
Ensure App is connected in TxManager Perform Error tests
j16r a2875ef
Small readability improvements to TestEthTxAdapter_Perform_ConfirmedW…
j16r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Optional
This line originally threw me off, because conceptually it's impossible for something to be
safe
before something that'ssent
. I later discovered you're using the receipt'sBlockNumber
to gauge whether something is safe so this works out.If possible, I would recommend renaming
sentAt
to something else, perhapscurrentHeight
?I would also rename the test
TestEthTxAdapter_Perform_ConfirmedWithBytesAndNoDataPrefix
from using the language Confirmed to using the more appropriate language Safe:TestEthTxAdapter_Perform_SafeWithBytesAndNoDataPrefix