Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into release-centrifuge_10…
Browse files Browse the repository at this point in the history
…24-client_1035
  • Loading branch information
wischli committed Dec 4, 2023
2 parents a0ea8cb + 93ace41 commit 597f674
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 33 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/sanity-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
matrix:
target: [test-general, test-integration,
lint-fmt, lint-clippy, cargo-build, docs-build] # ,lint-taplo]
lint-fmt, lint-clippy, cargo-build, docs-build, lint-taplo]
steps:
- name: Check out code
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab #3.5.2
Expand Down Expand Up @@ -55,4 +55,4 @@ jobs:
env:
TARGET: benchmark-check
RUNTIME: ${{ matrix.runtime }}
RUSTC_WRAPPER: "sccache"
RUSTC_WRAPPER: "sccache"
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ sp-transaction-pool = { git = "https://github.com/paritytech/substrate", branch
substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43" }

# Cli specific
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", features = ["rocksdb"]}
frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.43", features = ["rocksdb"] }
try-runtime-cli = { git = "https://github.com/paritytech/substrate", optional = true, branch = "polkadot-v0.9.43" }

# Local dependencies
Expand Down Expand Up @@ -361,7 +361,7 @@ xcm = { git = "https://github.com/paritytech/polkadot", default-features = false

# frontier
fc-consensus = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" }
fc-db = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43", features = ["rocksdb"]}
fc-db = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43", features = ["rocksdb"] }
fc-mapping-sync = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" }
fc-rpc = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" }
fc-rpc-core = { git = "https://github.com/moonbeam-foundation/frontier", default-features = false, branch = "moonbeam-polkadot-v0.9.43" }
Expand Down
8 changes: 8 additions & 0 deletions ci/run-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,23 @@ case $TARGET in
;;

lint-taplo)
# The recomended installation fails because an issue in taplo, issue:
# https://github.com/tamasfe/taplo/issues/507
# Should be fixed in the next taplo release.
# Recomended command:
# cargo install taplo-cli --locked
cargo install --git=https://github.com/tamasfe/taplo.git taplo-cli
taplo fmt --check
;;

lint-clippy)
cargo clippy --workspace -- -D warnings -A clippy::unnecessary-cast -A clippy::bool-to-int-with-if
;;

benchmark-check)
./scripts/check_benchmarks.sh $RUNTIME
;;

docs-build)
RUSTDOCFLAGS="-D warnings" cargo doc --all --no-deps
esac
1 change: 0 additions & 1 deletion libs/types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ cfg-primitives = { path = "../primitives", default-features = false }
cfg-traits = { path = "../traits", default-features = false }
cfg-utils = { path = "../utils", default-features = false }


[dev-dependencies]
frame-support = { git = "https://github.com/paritytech/substrate", default-features = true, branch = "polkadot-v0.9.43" }
hex = { version = "0.4.3", default_features = false }
Expand Down
38 changes: 19 additions & 19 deletions pallets/restricted-xtokens/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ frame-system = { workspace = true }
sp-std = { workspace = true }

# orml
orml-xtokens = { workspace = true }
orml-traits = { workspace = true }
orml-xtokens = { workspace = true }

# polkadot
xcm = { workspace = true }
Expand All @@ -30,27 +30,27 @@ cfg-traits = { workspace = true }
[features]
default = ["std"]
std = [
"serde",
"codec/std",
"sp-std/std",
"cfg-traits/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
"orml-xtokens/std",
"orml-traits/std",
"xcm/std"
"serde",
"codec/std",
"sp-std/std",
"cfg-traits/std",
"frame-support/std",
"frame-system/std",
"scale-info/std",
"orml-xtokens/std",
"orml-traits/std",
"xcm/std",
]

runtime-benchmarks = [
"cfg-traits/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"orml-xtokens/runtime-benchmarks",
"cfg-traits/runtime-benchmarks",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"orml-xtokens/runtime-benchmarks",
]
try-runtime = [
"cfg-traits/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"orml-xtokens/try-runtime",
"cfg-traits/try-runtime",
"frame-support/try-runtime",
"frame-system/try-runtime",
"orml-xtokens/try-runtime",
]
1 change: 0 additions & 1 deletion runtime/centrifuge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -454,4 +454,3 @@ on-chain-release-build = [

# Set timing constants (e.g. session period) to faster versions to speed up testing.
fast-runtime = []

21 changes: 13 additions & 8 deletions runtime/common/src/changes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,20 @@ pub struct FastDelay;

impl<T: Changeable> From<RuntimeChange<T, FastDelay>> for PoolChangeProposal {
fn from(runtime_change: RuntimeChange<T, FastDelay>) -> Self {
let new_requirements = runtime_change
.requirement_list()
.into_iter()
.map(|req| match req {
Requirement::DelayTime(_) => Requirement::DelayTime(60), // 1 min
req => req,
});
if cfg!(feature = "runtime-benchmarks") {
PoolChangeProposal::new([])
} else {
let new_requirements =
runtime_change
.requirement_list()
.into_iter()
.map(|req| match req {
Requirement::DelayTime(_) => Requirement::DelayTime(60), // 1 min
req => req,
});

PoolChangeProposal::new(new_requirements)
PoolChangeProposal::new(new_requirements)
}
}
}

Expand Down

0 comments on commit 597f674

Please sign in to comment.