Skip to content

Commit

Permalink
Additional filters support in my_recent_swaps #784. (#796)
Browse files Browse the repository at this point in the history
* WIP. Try rusqlite crate.

* WIP. Try rusqlite crate.

* WIP. Fix clippy.

* WIP. Added SQLite DB init and migration. TODO: insert swaps data into DB.

* WIP. Indexed existing swaps to SQLite on DB migration.

* WIP. Insert new started swaps data to SQLite.

* WIP. Added SQL selection of uuids depending on MyRecentSwapsReq.

* WIP. Refactor recent swaps uuids select to named params.

* Added from_uuid support for SQLite. Refactoring. Feature finished.

* Remove +nightly from cargo commands.

* Fixes after review.

* Set page_number to 1 in my_recent_swaps response
when page_number and from_uuid are not set in request.
  • Loading branch information
artemii235 authored Jan 28, 2021
1 parent 3cc42ed commit 9d9cd70
Show file tree
Hide file tree
Showing 20 changed files with 543 additions and 3,097 deletions.
75 changes: 74 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ serde_derive = "1.0"
serialization = { git = "https://github.com/artemii235/parity-bitcoin.git" }
serialization_derive = { git = "https://github.com/artemii235/parity-bitcoin.git" }
sp-trie = "2.0.0"
sql-builder = "3.1.1"

# Pin `term` to 0.5.1 because `dirs` is not portable, cf.
# https://github.com/Stebalien/term/commit/84cfdb51775b327fedf21784749d862fdffa10b4#diff-80398c5faae3c069e4e6aa2ed11b28c0
Expand Down
9 changes: 5 additions & 4 deletions azure-pipelines-build-stage-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,24 +35,25 @@ jobs:
mkdir upload
echo 2.1.$(Build.BuildId)_$(Build.SourceBranchName)_$(COMMIT_HASH)_$(Agent.OS)_Release > MM_VERSION
cat MM_VERSION
cargo +nightly build --features native --release
cargo build --features native --release
displayName: 'Build MM2 Release'
# Explicit --test-threads=16 makes testing process slightly faster on agents that have <16 CPU cores.
- bash: |
cargo +nightly test --features native --all -- --test-threads=16
cargo test --features native --all -- --test-threads=16
displayName: 'Test MM2'
timeoutInMinutes: 22
env:
BOB_PASSPHRASE: $(${{ parameters.bob_passphrase }})
BOB_USERPASS: $(${{ parameters.bob_userpass }})
ALICE_PASSPHRASE: $(${{ parameters.alice_passphrase }})
ALICE_USERPASS: $(${{ parameters.alice_userpass }})
RUST_LOG: debug
- bash: |
cargo +nightly clippy --features native -- -D warnings
cargo clippy --features native -- -D warnings
displayName: 'Check Clippy warnings'
condition: eq( variables['Agent.OS'], 'Linux' )
- bash: |
cargo +nightly fmt -- --check
cargo fmt -- --check
displayName: 'Check rustfmt warnings'
condition: eq( variables['Agent.OS'], 'Linux' )
- bash: |
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines-release-stage-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
mm2_builder \
/bin/bash -c "source /root/.cargo/env && cargo build --features native -vv --target-dir target-xenial"
else
cargo +nightly build --features native -vv
cargo build --features native -vv
fi
displayName: 'Build MM2 Debug'
condition: eq( variables['DEBUG_UPLOADED'], '' )
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
mm2_builder \
/bin/bash -c "source /root/.cargo/env && cargo build --features native --release -vv --target-dir target-xenial"
else
cargo +nightly build --features native --release -vv
cargo build --features native --release -vv
fi
displayName: 'Build MM2 Release'
condition: eq( variables['RELEASE_UPLOADED'], '' )
Expand Down
Loading

0 comments on commit 9d9cd70

Please sign in to comment.