Skip to content
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

Use subscriptions to detect tx inclusion when sending txs #1509

Merged
merged 2 commits into from
Mar 27, 2023

Conversation

sisou
Copy link
Member

@sisou sisou commented Mar 27, 2023

What's in this pull request?

Change transaction-awaiting in client.sendTransaction from an inefficient polling mechanism to re-use the client's address-event subscriptions introduced in #1437.

Also includes a small performance optimization in client.getTransactionsByAddress that returns early when there are no transactions to get.

This relates to #1339.

Pull request checklist

  • All tests pass. The project builds and runs.
  • I have resolved any merge conflicts.
  • I have resolved all clippy and rustfmt warnings.

@sisou sisou added refactor Refactoring of some component WASM labels Mar 27, 2023
@sisou sisou requested a review from jsdanielh March 27, 2023 01:23
@sisou sisou self-assigned this Mar 27, 2023
@sisou sisou changed the title Soeren/sub not poll Use address transaction subscriptions to detect address inclusion when sending transactions Mar 27, 2023
@sisou sisou changed the title Use address transaction subscriptions to detect address inclusion when sending transactions Use subscriptions to detect address inclusion when sending transactions Mar 27, 2023
@sisou sisou changed the title Use subscriptions to detect address inclusion when sending transactions Use subscriptions to detect tx inclusion when sending txs Mar 27, 2023
@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Patch coverage: 5.26% and project coverage change: -0.18 ⚠️

Comparison is base (913c1e0) 64.60% compared to head (b8a6069) 64.43%.

Additional details and impacted files
@@              Coverage Diff              @@
##           albatross    #1509      +/-   ##
=============================================
- Coverage      64.60%   64.43%   -0.18%     
=============================================
  Files            426      426              
  Lines          52951    52983      +32     
=============================================
- Hits           34208    34138      -70     
- Misses         18743    18845     +102     
Flag Coverage Δ
unittests 64.43% <5.26%> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
web-client/src/lib.rs 0.12% <0.00%> (-0.01%) ⬇️
web-client/src/transaction.rs 0.00% <0.00%> (ø)
consensus/src/consensus/consensus_proxy.rs 43.60% <80.00%> (+0.31%) ⬆️

... and 10 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jsdanielh jsdanielh merged commit b8a6069 into albatross Mar 27, 2023
@jsdanielh jsdanielh deleted the soeren/sub-not-poll branch March 27, 2023 03:45
@jsdanielh jsdanielh added this to the Nimiq PoS Testnet milestone Apr 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Refactoring of some component WASM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants