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

v0.11 fixes #30

Open
wants to merge 13 commits into
base: master
Choose a base branch
from
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,6 @@
[submodule "amplify-nonasync"]
path = amplify-nonasync
url = https://github.com/rust-amplify/amplify-nonasync.git
[submodule "altered_submodules/rgb"]
path = altered_submodules/rgb
url = https://github.com/RGB-WG/rgb
49 changes: 46 additions & 3 deletions Cargo.lock

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

15 changes: 15 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ rgb-runtime = { path = "./rgb", features = [
"serde",
] }
rgb-psbt = { path = "./rgb/psbt" }
## altered_submodules/rgb (cannot use path, see https://github.com/rust-lang/cargo/issues/10353)
rgb_altered = { git = "https://github.com/RGB-WG/rgb", branch = "revert_fix_same_blinded_transfer", package = "rgb-runtime", features = [
"electrum_blocking",
"esplora_blocking",
"fs",
"serde",
], optional = true }
psrgbt_altered = { git = "https://github.com/RGB-WG/rgb", branch = "revert_fix_same_blinded_transfer", package = "rgb-psbt", optional = true }
## rgb-interfaces
rgb-interfaces = { path = "./rgb-interfaces" }
## rgb-schemata
Expand Down Expand Up @@ -123,3 +131,10 @@ strict_encoding_derive = { path = "./strict-encoding/rust/derive" }
strict_types = { path = "./strict-types" }
## vesper
vesper-lang = { path = "./vesper" }

[features]
default = []
altered = [
"rgb_altered",
"psrgbt_altered",
]
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ If you are developing new tests and want a faster execution, you can set
cannot switch to another indexer when using this option, you'll have to use the
same indexer type from the previous test execution.

A feature `altered` is there to run some specific tests with altered crates
(e.g. tests that simulate a modified sender that tries to perform an attack).
Run `cargo test --features altered` to run those tests.

### Coverage

To run the tests and generate a code coverage report run:
Expand Down
1 change: 1 addition & 0 deletions altered_submodules/rgb
Submodule rgb added at a12c63
2 changes: 1 addition & 1 deletion rgb
2 changes: 1 addition & 1 deletion rgb-interfaces
1 change: 1 addition & 0 deletions tests/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ _tit "generating coverage report"
# shellcheck disable=2086
INDEXER=esplora $COV --html "${LLVM_COV_OPTS[@]}" "${CARGO_TEST_OPTS[@]}"
INDEXER=electrum $COV --no-clean --html "${LLVM_COV_OPTS[@]}" "${CARGO_TEST_OPTS[@]}"
SKIP_INIT=1 INDEXER=electrum $COV --no-clean --html "${LLVM_COV_OPTS[@]}" --features altered

## show html report location
echo "generated html report: target/llvm-cov/html/index.html"
Loading
Loading