-
Notifications
You must be signed in to change notification settings - Fork 286
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
feat(core-transaction-pool): Switch expiration to chain height #2461
Merged
Merged
Changes from all commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
525f165
feat(core-transaction-pool): Switch expiration to chain height
vasild e61fa9f
fix(core-transaction-pool): properly get the current chain height
vasild 2b76687
Merge branch 'develop' into transaction-expiration-in-height
faustbrian f6df72c
Merge branch 'develop' into transaction-expiration-in-height
faustbrian 8186c8a
Update __tests__/unit/core-transaction-pool/connection.test.ts
faustbrian da79b1c
Update __tests__/unit/core-transaction-pool/connection.test.ts
faustbrian 4675364
Update __tests__/unit/core-transaction-pool/connection.test.ts
faustbrian 086aa30
Update packages/core-transaction-pool/src/memory.ts
faustbrian 6c10fe5
chore(core-transaction-pool): rename MemoryTransaction
vasild 9794070
chore(core-transaction-pool): get current height from "blockchain"
vasild 4d1e25c
chore(core-transaction-pool): remove unused variable
vasild 1e58fe3
Merge branch 'develop' into transaction-expiration-in-height
faustbrian 0167421
fix(core-transaction-pool): get current height in a more robust way
vasild fb8631b
chore(core-transaction-pool): remove unreachable code
vasild 31c0835
test(core-transaction-pool): disable tx exiration test
vasild dd58504
Merge remote-tracking branch 'ArkEcosystem/core/develop' into transac…
vasild fd1c4ec
chore(core-transaction-pool): only use app.has if it is available
vasild de89d7a
fix(core-transaction-pool): handle undefined "expiration"
vasild 68334f7
Merge remote-tracking branch 'ArkEcosystem/core/develop' into transac…
vasild 00b0a22
tests(core-transaction-pool): fix a disabled test by proper mocking
vasild 21845ee
Merge remote-tracking branch 'ArkEcosystem/core/develop' into transac…
vasild e5581c8
tests(core-transaction-pool): adjust after a4567cd26
vasild a2b52a0
chore(core-transaction-pool): simplify, now that we have the last block
vasild 541c2e6
Merge remote-tracking branch 'ArkEcosystem/core/develop' into transac…
vasild 156cd28
Merge branch 'develop' into transaction-expiration-in-height
faustbrian 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
28 changes: 0 additions & 28 deletions
28
__tests__/unit/core-transaction-pool/memory-transaction.test.ts
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
export const state = { | ||
cacheTransactions: () => null, | ||
getLastBlock: () => ({ data: { height: 0 } }), | ||
removeCachedTransactionIds: () => null, | ||
}; |
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.
Rename this to something better so the comment is not needed to understand what it does.
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.
I think the variable name is fine, any suggestions are welcome though.
It is not possible to condense the information from 3 lines into a variable name. In this case the important information the comment is conveying is:
Please, do not remove the comment.
It is normal to have one or two sentences describing each variable/config parameter, for example:
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.
How is it not possible to convey that minuscule bit of information in a variable name? All of the following make it pretty clear that it is about lifetime/expiration of the transaction and the unit of measurement is a number of blocks.
transactionTtlInBlocks
transactionLifetimeInBlocks
transactionValidForNumberOfBlocks
transactionMaxAgeInBlocks
transactionExpiresAfterNumberOfBlocks