Skip to content

Commit

Permalink
scrypto 1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz2891 committed Nov 28, 2024
1 parent f4ae51f commit 0f1aac7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ crypto_secp256k1 = ["secp256k1/recovery", "secp256k1/lowmemory", "secp256k1/allo
crypto_k256 = ["k256/alloc", "k256/sha256", "k256/ecdsa"]

# A variant of decrypting the message-signers using Radix library.
crypto_radix = ["scrypto", "radix-common", "secp256k1/lowmemory"]
crypto_radix = ["scrypto", "radix-common", "secp256k1/lowmemory", "getrandom/js"]

# A set of helpers for testing & offline usage.
helpers = ["hex/serde", "hex/alloc"]
Expand All @@ -45,6 +45,7 @@ k256 = { version = "^0.13.4", default-features = false, features = [], optional
secp256k1 = { version = "^0.29.1", default-features = false, features = [], optional = true }
hex = { version = "^0.4.3", default-features = false, features = [], optional = true }
primitive-types = { version = "^0.13.1", optional = true }
getrandom = { version = "^0.2.15", optional = true, default-features = false, features = [] }

[dev-dependencies]
itertools = { version = "^0.13.0" }
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
CLIPPY=cargo clippy --release --fix --allow-dirty --allow-staged
DOC=cargo doc --no-deps --document-private-items
TEST=RUST_BACKTRACE=full cargo test --features="helpers"
FEATURE_SETS="crypto_k256" "crypto_k256,network_casper" "crypto_secp256k1" "crypto_secp256k1,network_casper" "crypto_radix" "crypto_radix,network_radix"
FEATURE_SETS="crypto_k256" "crypto_k256,network_casper" "crypto_secp256k1" "crypto_secp256k1,network_casper" "crypto_secp256k1,network_radix"

prepare:
@rustup target add wasm32-unknown-unknown

test: clippy
# Hard to say why it doesn't work
# $(TEST) --features="crypto_radix,network_radix" --target wasm32-unknown-unknown
# $(TEST) --features="crypto_radix" --target wasm32-unknown-unknown
@for features in $(FEATURE_SETS); do \
echo "Running tests with features: $$features"; \
($(TEST) --features=$$features); \
Expand Down
2 changes: 1 addition & 1 deletion src/utils/trim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ mod tests {

#[should_panic(expected = "Number overflow: 18591708106338011145")]
#[test]
fn test_trim_end_u64_overflow() {
fn test_trim_end_u64_overflow_u64() {
let mut bytes = vec![1u8, 2, 3, 4, 5, 6, 7, 8, 9];

let _: u64 = bytes.trim_end(9);
Expand Down

0 comments on commit 0f1aac7

Please sign in to comment.