Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Commit ac18f1b

Browse files
committed
Merge branch 'master' of github.com:paritytech/substrate into gupnik/optional_hashers_dev
2 parents 8fcc35b + 32221d4 commit ac18f1b

File tree

3 files changed

+13
-23
lines changed

3 files changed

+13
-23
lines changed

frame/balances/src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -782,8 +782,8 @@ pub mod pallet {
782782
}
783783
a.flags.set_new_logic();
784784
if !a.reserved.is_zero() || !a.frozen.is_zero() {
785-
if !system::Pallet::<T>::can_inc_consumer(who) {
786-
// Gah!! We have a non-zero reserve balance but no provider refs :(
785+
if system::Pallet::<T>::providers(who) == 0 {
786+
// Gah!! We have no provider refs :(
787787
// This shouldn't practically happen, but we need a failsafe anyway: let's give
788788
// them enough for an ED.
789789
log::warn!(
@@ -794,7 +794,7 @@ pub mod pallet {
794794
a.free = a.free.max(Self::ed());
795795
system::Pallet::<T>::inc_providers(who);
796796
}
797-
let _ = system::Pallet::<T>::inc_consumers(who).defensive();
797+
let _ = system::Pallet::<T>::inc_consumers_without_limit(who).defensive();
798798
}
799799
// Should never fail - we're only setting a bit.
800800
let _ = T::AccountStore::try_mutate_exists(who, |account| -> DispatchResult {

scripts/ci/gitlab/pipeline/build.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,6 @@ build-rustdoc:
148148
variables:
149149
SKIP_WASM_BUILD: 1
150150
DOC_INDEX_PAGE: "sc_service/index.html" # default redirected page
151-
RUSTY_CACHIER_TOOLCHAIN: nightly
152151
# this variable gets overriden by "rusty-cachier environment inject", use the value as default
153152
CARGO_TARGET_DIR: "$CI_PROJECT_DIR/target"
154153
artifacts:
@@ -163,7 +162,7 @@ build-rustdoc:
163162
artifacts: false
164163
script:
165164
- rusty-cachier snapshot create
166-
- time cargo +nightly doc --locked --workspace --all-features --verbose --no-deps
165+
- time cargo doc --locked --workspace --all-features --verbose --no-deps
167166
- rm -f $CARGO_TARGET_DIR/doc/.lock
168167
- mv $CARGO_TARGET_DIR/doc ./crate-docs
169168
# FIXME: remove me after CI image gets nonroot

scripts/ci/gitlab/pipeline/test.yml

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -61,21 +61,17 @@ cargo-clippy:
6161
needs:
6262
- job: cargo-fmt
6363
artifacts: false
64-
variables:
65-
RUSTY_CACHIER_TOOLCHAIN: nightly
6664
extends:
6765
- .docker-env
6866
- .test-refs
6967
script:
7068
- rusty-cachier snapshot create
71-
- SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly clippy --all-targets
69+
- SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy --all-targets
7270
- rusty-cachier cache upload
7371

7472
cargo-check-benches:
7573
stage: test
7674
variables:
77-
# Override to use nightly toolchain
78-
RUSTY_CACHIER_TOOLCHAIN: "nightly"
7975
CI_JOB_NAME: "cargo-check-benches"
8076
extends:
8177
- .docker-env
@@ -105,7 +101,7 @@ cargo-check-benches:
105101
- echo "___Running benchmarks___";
106102
- case ${CI_NODE_INDEX} in
107103
1)
108-
SKIP_WASM_BUILD=1 time cargo +nightly check --locked --benches --all;
104+
SKIP_WASM_BUILD=1 time cargo check --locked --benches --all;
109105
cargo run --locked --release -p node-bench -- ::trie::read::small --json
110106
| tee ./artifacts/benches/$CI_COMMIT_REF_NAME-$CI_COMMIT_SHORT_SHA/::trie::read::small.json;
111107
echo "___Uploading cache for rusty-cachier___";
@@ -301,17 +297,16 @@ test-frame-examples-compile-to-wasm:
301297
- .docker-env
302298
- .test-refs
303299
variables:
304-
RUSTY_CACHIER_TOOLCHAIN: nightly
305300
# Enable debug assertions since we are running optimized builds for testing
306301
# but still want to have debug assertions.
307302
RUSTFLAGS: "-C debug-assertions"
308303
RUST_BACKTRACE: 1
309304
script:
310305
- rusty-cachier snapshot create
311306
- cd ./frame/examples/offchain-worker/
312-
- cargo +nightly build --locked --target=wasm32-unknown-unknown --no-default-features
307+
- cargo build --locked --target=wasm32-unknown-unknown --no-default-features
313308
- cd ../basic
314-
- cargo +nightly build --locked --target=wasm32-unknown-unknown --no-default-features
309+
- cargo build --locked --target=wasm32-unknown-unknown --no-default-features
315310
- rusty-cachier cache upload
316311

317312
test-linux-stable-int:
@@ -344,17 +339,15 @@ check-tracing:
344339
needs:
345340
- job: test-linux-stable-int
346341
artifacts: false
347-
variables:
348-
RUSTY_CACHIER_TOOLCHAIN: nightly
349342
extends:
350343
- .docker-env
351344
- .test-refs
352345
- .pipeline-stopper-artifacts
353346
script:
354347
- rusty-cachier snapshot create
355348
# with-tracing must be explicitly activated, we run a test to ensure this works as expected in both cases
356-
- time cargo +nightly test --locked --manifest-path ./primitives/tracing/Cargo.toml --no-default-features
357-
- time cargo +nightly test --locked --manifest-path ./primitives/tracing/Cargo.toml --no-default-features --features=with-tracing
349+
- time cargo test --locked --manifest-path ./primitives/tracing/Cargo.toml --no-default-features
350+
- time cargo test --locked --manifest-path ./primitives/tracing/Cargo.toml --no-default-features --features=with-tracing
358351
- rusty-cachier cache upload
359352

360353
# more information about this job can be found here:
@@ -369,17 +362,16 @@ test-full-crypto-feature:
369362
- .docker-env
370363
- .test-refs
371364
variables:
372-
RUSTY_CACHIER_TOOLCHAIN: nightly
373365
# Enable debug assertions since we are running optimized builds for testing
374366
# but still want to have debug assertions.
375367
RUSTFLAGS: "-C debug-assertions"
376368
RUST_BACKTRACE: 1
377369
script:
378370
- rusty-cachier snapshot create
379371
- cd primitives/core/
380-
- time cargo +nightly build --locked --verbose --no-default-features --features full_crypto
372+
- time cargo build --locked --verbose --no-default-features --features full_crypto
381373
- cd ../application-crypto
382-
- time cargo +nightly build --locked --verbose --no-default-features --features full_crypto
374+
- time cargo build --locked --verbose --no-default-features --features full_crypto
383375
- rusty-cachier cache upload
384376

385377
check-rustdoc:
@@ -388,12 +380,11 @@ check-rustdoc:
388380
- .docker-env
389381
- .test-refs
390382
variables:
391-
RUSTY_CACHIER_TOOLCHAIN: nightly
392383
SKIP_WASM_BUILD: 1
393384
RUSTDOCFLAGS: "-Dwarnings"
394385
script:
395386
- rusty-cachier snapshot create
396-
- time cargo +nightly doc --locked --workspace --all-features --verbose --no-deps
387+
- time cargo doc --locked --workspace --all-features --verbose --no-deps
397388
- rusty-cachier cache upload
398389

399390
cargo-check-each-crate:

0 commit comments

Comments
 (0)