This repository has been archived by the owner on Jan 12, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
feat: retry policy of unconfirmed transaction from stream #304
Merged
Conversation
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
Will help for testing and managing properly
This pull request fixes 1 alert when merging 5626d14 into c729801 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 43d16a3 into c729801 - view on LGTM.com fixed alerts:
|
This pull request fixes 1 alert when merging 5d98212 into c729801 - view on LGTM.com fixed alerts:
|
shumkov
reviewed
Sep 7, 2021
src/plugins/Workers/TransactionSyncStreamWorker/methods/handleTransactionFromStream.js
Outdated
Show resolved
Hide resolved
shumkov
reviewed
Sep 7, 2021
src/plugins/Workers/TransactionSyncStreamWorker/methods/handleTransactionFromStream.js
Show resolved
Hide resolved
shumkov
reviewed
Sep 7, 2021
src/plugins/Workers/TransactionSyncStreamWorker/methods/syncUpToTheGapLimit.js
Outdated
Show resolved
Hide resolved
shumkov
reviewed
Sep 7, 2021
src/plugins/Workers/TransactionSyncStreamWorker/methods/syncUpToTheGapLimit.js
Outdated
Show resolved
Hide resolved
shumkov
reviewed
Sep 7, 2021
shumkov
reviewed
Sep 7, 2021
shumkov
reviewed
Sep 7, 2021
shumkov
approved these changes
Sep 28, 2021
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.
LGTM! 👍
shumkov
added a commit
that referenced
this pull request
Sep 29, 2021
…)" This reverts commit d59cd1d.
shuplenkov
pushed a commit
that referenced
this pull request
Oct 25, 2021
* feat: added TransactionMetadataNotInStore error * feat(Storage): added TransactionMetadata import and store * fix(Account): getTransaction to ensure tx before adding it * feat(DAPIClientTransport)!: getTransaction return transaction and meta * feat(Storage): addedd getTransactionMetadata & searchTransactionMetadata * feat: allow transaction with metadata to be stored in bulk * feat(Account)!: getTransaction returns metadata when able * feat(TransactionSyncStreamWorker): sync transaction with metadata * fix: merge conflict artifact * fix: getTransaction correctly add metadata if not in store * test: updated tests * fix: disable promise executor as need async * doc: updated documentation & ts specs * test: update integration test * feat: implements extendTransactionsWithMetadata utils * feat: implements categorizeTransactions utils * feat: implements filterTransactions util method * feat: move utils to single file Will help for testing and managing properly * feat: ensure we retrieve the tx inclusion blockheader too * feat(account): re-enable and clean-up getTransactionHistory * doc: describe getTransactionHistory returned types * test: provide utils coverage * feat: categorizedTransaction added from & to props * test(filterTransactions): added test * test(extendTx): added tests * feat: categorizeTransaction to classify otherAccountAddresses * feat: categorizeTransactions tests + correct type categorization * feat: getTransactionHistory to return expected output * docs: provide documentation * fix: only import blockHeader when existing * feat: provide filter for misc address * feat: provide classifyAddresses for privatekey based account * doc: updated TransactionHistory types * test: fix transaction hash * test: fixed utils tests * feat: calculateTransactionFees warning on missing input's output * fix: syncing not waiting for last transaction response * test: provide getTransactionHistory tests * doc: fix lint * test: fix wrong hash in getTx * test: update test with correct block hash * fix: searchTransactionMetadata is not a function (#303) * feat(subscribeToBlocks): announce blockheight * feat: add retry policy for unconfirmed transaction from stream * feat: use blockheight instead of setTimeout * feat: retry fetching transaction at next lock if unconfirmed * feat(importTransaction): replace previous metadata on import * doc: added event and plugin accessing listener doc * fix: import transaction handling on height is zero * style: update from review Co-authored-by: Konstantin Shuplenkov <konstantin.shuplenkov@dash.org>
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Issue being fixed or feature implemented
Built on top of #295, this PR aim to fix #220 and #295 remaining bit.
When a transaction is being fetched but is not included in a block, Wallet-lib is not able to fetch it's corresponding blockHeader.
This PR adds a retry policy on the transaction stream such that for each unconfirmed transaction received, it will wait for next blockheight change to retry fetching the transaction in order to wait for its inclusion in a block and therefore correctly identity its metadata.
What was done?
How Has This Been Tested?
Breaking Changes
Checklist:
For repository code-owners and collaborators only