diff --git a/.github/workflows/cd.yaml b/.github/workflows/cd.yaml index d753c9ad9..4f5c88126 100644 --- a/.github/workflows/cd.yaml +++ b/.github/workflows/cd.yaml @@ -50,7 +50,9 @@ jobs: windows-release: name: Windows Release - runs-on: windows-latest + runs-on: windows-2019 + env: + ROARING_ARCH: x86-64-v2 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d1ebb62c4..3e64c03f0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -25,7 +25,9 @@ jobs: windows-tests: name: Windows Tests - runs-on: windows-latest + runs-on: windows-2019 + env: + ROARING_ARCH: x86-64-v2 steps: - name: Checkout uses: actions/checkout@v3 diff --git a/Cargo.lock b/Cargo.lock index 45dccede0..264b93f86 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -146,7 +146,7 @@ dependencies = [ [[package]] name = "arrayvec" -version = "0.5.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" @@ -874,7 +874,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" dependencies = [ "nix", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1218,7 +1218,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1240,7 +1240,7 @@ dependencies = [ [[package]] name = "event-listener-strategy" -version = "0.5.2" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" dependencies = [ @@ -1284,7 +1284,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -1944,7 +1944,7 @@ version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" dependencies = [ - "windows-sys 0.52.0", + "windows-sys", ] [[package]] @@ -3348,7 +3348,7 @@ dependencies = [ "pin-project-lite 0.2.14", "rustix 0.38.34", "tracing", - "windows-sys 0.52.0", + "windows-sys", ] [[package]] diff --git a/chain/src/txhashset/txhashset.rs b/chain/src/txhashset/txhashset.rs index 1257df19b..a49b5af24 100644 --- a/chain/src/txhashset/txhashset.rs +++ b/chain/src/txhashset/txhashset.rs @@ -1388,7 +1388,7 @@ impl<'a> Extension<'a> { /// Once the PIBD set is downloaded, we need to ensure that the respective leaf sets /// match the bitmap (particularly in the case of outputs being spent after a PIBD catch-up) pub fn update_leaf_sets(&mut self, bitmap: &Bitmap) -> Result<(), Error> { - let flipped = bitmap.flip(0..bitmap.maximum().unwrap() as u32 + 1); + let flipped = bitmap.flip(0u32..bitmap.maximum().unwrap() + 1); for spent_pmmr_index in flipped.iter() { let pos0 = pmmr::insertion_to_pmmr_index(spent_pmmr_index.into()); self.output_pmmr.remove_from_leaf_set(pos0); diff --git a/store/src/leaf_set.rs b/store/src/leaf_set.rs index dd013d162..7bb07551d 100644 --- a/store/src/leaf_set.rs +++ b/store/src/leaf_set.rs @@ -114,7 +114,7 @@ impl LeafSet { // First remove pos from leaf_set that were // added after the point we are rewinding to. - let to_remove = ((cutoff_pos + 1) as u32)..bitmap.maximum().unwrap_or(0); + let to_remove = ((cutoff_pos + 1) as u32)..=bitmap.maximum().unwrap_or(0); bitmap.remove_range(to_remove); // Then add back output pos to the leaf_set @@ -133,7 +133,7 @@ impl LeafSet { pub fn rewind(&mut self, cutoff_pos: u64, rewind_rm_pos: &Bitmap) { // First remove pos from leaf_set that were // added after the point we are rewinding to. - let to_remove = ((cutoff_pos + 1) as u32)..self.bitmap.maximum().unwrap_or(0); + let to_remove = ((cutoff_pos + 1) as u32)..=self.bitmap.maximum().unwrap_or(0); self.bitmap.remove_range(to_remove); // Then add back output pos to the leaf_set diff --git a/store/src/prune_list.rs b/store/src/prune_list.rs index 241058f49..2d85782ac 100644 --- a/store/src/prune_list.rs +++ b/store/src/prune_list.rs @@ -258,7 +258,8 @@ impl PruneList { } // Note: We will treat this as a "closed range" below (croaring api weirdness). - let cleanup_pos1 = (lc0 + 1)..size; + // Note: After croaring upgrade to 1.0.2 we provide an inclusive range directly + let cleanup_pos1 = (lc0 + 1)..=size; // Find point where we can truncate based on bitmap "rank" (index) of pos to the left of subtree. let idx = self.bitmap.rank(lc0);