Skip to content

Commit

Permalink
Debug CI
Browse files Browse the repository at this point in the history
  • Loading branch information
cmichi committed Jan 5, 2025
1 parent 7601b71 commit 6d2a0d4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,7 @@ jobs:
for crate in ${ALSO_RISCV_CRATES}; do
echo ${crate};
RUSTFLAGS="--cfg substrate_runtime" cargo +nightly build \
--no-default-features --release
--no-default-features --release \
--target $CLIPPY_TARGET \
--verbose \
--manifest-path ./crates/${crate}/Cargo.toml \
Expand Down Expand Up @@ -501,7 +501,7 @@ jobs:
with:
# run all tests with --all-features, which will run the e2e-tests feature if present
args: /bin/bash -c "scripts/for_all_contracts_exec.sh --path integration-tests --ignore public/static-buffer --partition ${{ matrix.partition }}/6 -- \
cargo +nightly test --all-features --verbose --manifest-path {} -- --list"
cargo +nightly test --all-features --all --manifest-path {}"

examples-custom-test:
# todo
Expand Down
11 changes: 7 additions & 4 deletions integration-tests/public/upgradeable-contracts/delegator/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,17 @@ pub mod delegator {
pub fn new(init_value: i32, hash: H256, addr: H160) -> Self {
let v = Mapping::new();

// todo locking is no longer necessary, as the contract needs
// to be instantiated anyway. and the code can anyway not be removed,
// as long as there is a contract for it.
/*
// Initialize the hash of the contract to delegate to.
// Adds a delegate dependency lock, ensuring that the delegated to code cannot
// be removed.
let mut delegate_to = Lazy::new();
delegate_to.set(&(hash, addr));
Self::env().lock_delegate_dependency(&hash);
*/

Self {
addresses: v,
Expand All @@ -61,11 +66,9 @@ pub mod delegator {
pub fn update_delegate_to(&mut self, hash: H256, addr: H160) {
if let Some(delegate_to) = self.delegate_to.get() {
let old_hash = delegate_to.0;
self.env().unlock_delegate_dependency(&old_hash)

// call old delegatee and tell them to sel--destruct
//self.env().unlock_delegate_dependency(&old_hash)
}
self.env().lock_delegate_dependency(&hash);
//self.env().lock_delegate_dependency(&hash);
self.delegate_to.set(&(hash, addr));
}

Expand Down

0 comments on commit 6d2a0d4

Please sign in to comment.