forked from jl777/SuperNET
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Implement BCH and SLP tx history. Refactoring. #1175
Merged
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
# Conflicts: # mm2src/coins/lightning.rs # mm2src/coins/lightning/ln_rpc.rs
# Conflicts: # mm2src/coins/qrc20/history.rs # mm2src/coins/utxo.rs # mm2src/coins/utxo/slp.rs # mm2src/coins/utxo/utxo_common.rs # mm2src/coins/utxo/utxo_tests.rs # mm2src/coins_activation/src/bch_with_tokens_activation.rs # mm2src/docker_tests.rs # mm2src/docker_tests/qrc20_tests.rs # mm2src/lp_swap/taker_swap.rs
# Conflicts: # mm2src/common/common.rs
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.
Great the huge refactoring!
I left a few questions and comments. Could you please answer them?
sergeyboyko0791
approved these changes
Dec 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.
Looks good to me!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Added TxHistoryStorage trait.
Implemented it for SQLite DB.
Added TxDetailsBuilder struct.
Implemented BCH and SLP tx history fetching loop as a state machine. It fetches data for all SLP transfers - if a token is activated later its history will be available immediately.
Added my_tx_history 2.0 RPC for native platforms.
Created db_common crate.
block_on now uses
CORE.block_on
. Addedasync_blocking
helper to run blocking IO in the async context. cc @Milerius this can help with the Solana RPC client in: #1109Updated Rust toolchain.
TODO for later: implement TxHistoryStorage for IndexedDB to support WASM.
Also, there is a possible solution for #1166. We can require all the background spawning fns to return AbortHandle and add it to
MmCtx::abort_handlers
, which are already used inMmCtx::stop
.#701