Skip to content

Commit

Permalink
fmt fixes + clippy fixes by enforcing specific wasm-bindgen version
Browse files Browse the repository at this point in the history
  • Loading branch information
0xA001113 committed Oct 23, 2024
1 parent ba4ae26 commit 6799c51
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 13 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,11 @@ jobs:

test:
name: Test Suite
# runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
steps:

# Clean unnecessary files to save disk space
- name: clean unnecessary files to save space
run: |
Expand Down Expand Up @@ -68,6 +66,7 @@ jobs:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:

# This might remove tools that are actually needed, if set to "true" but frees about 6 GB
tool-cache: false

Expand Down Expand Up @@ -191,6 +190,7 @@ jobs:
sudo update-alternatives --install /usr/bin/c++ c++ /usr/lib/llvm-15/bin/clang++ 0
- name: Install gcc-multilib

# gcc-multilib allows clang to find gnu libraries properly
run: |
sudo apt-get update
Expand Down Expand Up @@ -266,6 +266,7 @@ jobs:
sudo update-alternatives --install /usr/bin/c++ c++ /usr/lib/llvm-15/bin/clang++ 0
- name: Install gcc-multilib

# gcc-multilib allows clang to find gnu libraries properly
run: |
sudo apt-get update
Expand Down Expand Up @@ -349,6 +350,7 @@ jobs:

- name: Build on Linux
if: runner.os == 'Linux'

# We're using musl to make the binaries statically linked and portable
run: |
cargo install cargo-zigbuild
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ tonic = { version = "0.12.3", features = ["tls-webpki-roots", "gzip", "transport
tonic-build = { version = "0.12.3", features = ["prost"] }
triggered = "0.1.2"
uuid = { version = "1.5.0", features = ["v4", "fast-rng", "serde"] }
wasm-bindgen = { version = "0.2.93", features = ["serde-serialize"] }
wasm-bindgen = { version = "=0.2.93", features = ["serde-serialize"] }
wasm-bindgen-futures = "0.4.43"
wasm-bindgen-test = "0.3.43"
web-sys = "0.3.70"
Expand Down
2 changes: 1 addition & 1 deletion components/addressmanager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -515,12 +515,12 @@ mod address_store_with_cache {

use super::*;
use address_manager::AddressManager;
use rv::{dist::Uniform, misc::ks_test as one_way_ks_test, traits::Cdf};
use spectre_consensus_core::config::{params::SIMNET_PARAMS, Config};
use spectre_core::task::tick::TickService;
use spectre_database::create_temp_db;
use spectre_database::prelude::ConnBuilder;
use spectre_utils::networking::IpAddress;
use rv::{dist::Uniform, misc::ks_test as one_way_ks_test, traits::Cdf};
use std::net::{IpAddr, Ipv6Addr};

#[test]
Expand Down
4 changes: 2 additions & 2 deletions consensus/benches/check_scripts.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion, SamplingMode};
use rand::{thread_rng, Rng};
use secp256k1::Keypair;
use spectre_addresses::{Address, Prefix, Version};
use spectre_consensus::processes::transaction_validator::transaction_validator_populated::{
check_scripts_par_iter, check_scripts_par_iter_pool, check_scripts_sequential,
Expand All @@ -10,8 +12,6 @@ use spectre_consensus_core::tx::{MutableTransaction, Transaction, TransactionInp
use spectre_txscript::caches::Cache;
use spectre_txscript::pay_to_address_script;
use spectre_utils::iter::parallelism_in_power_steps;
use rand::{thread_rng, Rng};
use secp256k1::Keypair;

// You may need to add more detailed mocks depending on your actual code.
fn mock_tx(inputs_count: usize, non_uniq_signatures: usize) -> (Transaction, Vec<UtxoEntry>) {
Expand Down
2 changes: 1 addition & 1 deletion consensus/benches/parallel_muhash.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
use criterion::{black_box, criterion_group, criterion_main, Criterion};
use itertools::Itertools;
use rayon::prelude::*;
use spectre_consensus_core::{
muhash::MuHashExtensions,
subnets::SUBNETWORK_ID_NATIVE,
Expand All @@ -8,7 +9,6 @@ use spectre_consensus_core::{
use spectre_hashes::TransactionID;
use spectre_muhash::MuHash;
use spectre_utils::iter::parallelism_in_power_steps;
use rayon::prelude::*;

fn generate_transaction(ins: usize, outs: usize, randomness: u64) -> SignableTransaction {
let mut tx = Transaction::new(0, vec![], vec![], 0, SUBNETWORK_ID_NATIVE, 0, vec![]);
Expand Down
2 changes: 1 addition & 1 deletion consensus/src/consensus/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,11 @@ use crossbeam_channel::{
use itertools::Itertools;
use spectre_consensusmanager::{SessionLock, SessionReadGuard};

use rayon::iter::{IntoParallelRefIterator, ParallelIterator};
use spectre_database::prelude::StoreResultExtensions;
use spectre_hashes::Hash;
use spectre_muhash::MuHash;
use spectre_txscript::caches::TxScriptCacheCounters;
use rayon::iter::{IntoParallelRefIterator, ParallelIterator};

use std::{
cmp::Reverse,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use crate::constants::{MAX_SOMPI, SEQUENCE_LOCK_TIME_DISABLED, SEQUENCE_LOCK_TIME_MASK};
use rayon::iter::{IntoParallelIterator, ParallelIterator};
use rayon::ThreadPool;
use spectre_consensus_core::hashing::sighash::{SigHashReusedValues, SigHashReusedValuesSync};
use spectre_consensus_core::{
hashing::sighash::SigHashReusedValuesUnsync,
Expand All @@ -9,8 +11,6 @@ use spectre_core::warn;
use spectre_txscript::caches::Cache;
use spectre_txscript::{get_sig_op_count, SigCacheKey, TxScriptEngine};
use spectre_txscript_errors::TxScriptError;
use rayon::iter::{IntoParallelIterator, ParallelIterator};
use rayon::ThreadPool;
use std::marker::Sync;

use super::{
Expand Down
2 changes: 1 addition & 1 deletion rpc/wrpc/examples/simple_client/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use spectre_wrpc_client::{
prelude::NetworkId,
prelude::NetworkType,
result::Result,
SpectreRpcClient, Resolver, WrpcEncoding,
Resolver, SpectreRpcClient, WrpcEncoding,
};
use std::process::ExitCode;
use std::time::Duration;
Expand Down
2 changes: 1 addition & 1 deletion wallet/keys/src/publickey.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
use crate::imports::*;

use spectre_consensus_core::network::NetworkType;
use ripemd::{Digest, Ripemd160};
use sha2::Sha256;
use spectre_consensus_core::network::NetworkType;

/// Data structure that envelopes a PublicKey.
/// Only supports Schnorr-based addresses.
Expand Down

0 comments on commit 6799c51

Please sign in to comment.