Skip to content
This repository has been archived by the owner on Jan 12, 2022. It is now read-only.

fix(TransactionSyncWorker): improve stream response handling #323

Merged
merged 22 commits into from
Oct 5, 2021

Conversation

Alex-Werner
Copy link
Contributor

@Alex-Werner Alex-Werner commented Sep 28, 2021

Issue being fixed or feature implemented

There are several UTXO related bugs:

  • Transaction is rejected: tx-txlock-conflict
  • Not enough balance (0) to cover burn amount of 5
  • utxosList must contain at least 1 utxo

Also, Due to a bug in grpc-js explained here. A temporary solution is used to bypass this bug until a fix is merged into Node.js explained here

What was done?

  • moved handlers to their specific file
  • added event-based queue async processing for stream chunks
  • bip44 to correctly generate by type (internal, external)
  • wrapped up stream.cancel into setImmediate

How Has This Been Tested?

  • added additional tests

Breaking Changes

Fixed a generated value that was faulty as only representing external generated. Any dependency to generated from ensureAddressesToGapLimit utils will need to be updated.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@Alex-Werner Alex-Werner added this to the v0.21.0 milestone Sep 28, 2021
@Alex-Werner Alex-Werner marked this pull request as ready for review October 4, 2021 01:51
@lgtm-com
Copy link

lgtm-com bot commented Oct 4, 2021

This pull request introduces 1 alert when merging e02a685 into 19a3f68 - view on LGTM.com

new alerts:

  • 1 for Unused variable, import, function or class

src/utils/Queue/Queue.js Outdated Show resolved Hide resolved
Copy link
Member

@shumkov shumkov left a comment

Choose a reason for hiding this comment

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

Good job, guys! 👍

@shumkov shumkov merged commit 021c6f9 into v0.21-dev Oct 5, 2021
@shumkov shumkov deleted the fix/utxo-inclusion branch October 5, 2021 17:07
shuplenkov pushed a commit that referenced this pull request Oct 25, 2021
Co-authored-by: Djavid Gabibiyan <djavidoff@gmail.com>
Co-authored-by: Ivan Shumkov <ivan@shumkov.ru>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants