Skip to content

Commit

Permalink
Revert some changes from main
Browse files Browse the repository at this point in the history
  • Loading branch information
vmarkushin committed Aug 8, 2024
1 parent 04f53c5 commit 9315a7b
Show file tree
Hide file tree
Showing 8 changed files with 65 additions and 54 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Cargo Check
on:
pull_request:
branches:
- 'main'
- 'master'
- 'develop'
- 'release*'
push:
branches:
- 'main'
- 'master'
- 'develop'
- 'release*'

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hyperspace-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: "Build and publish Hyperspace Docker image"
on:
push:
branches:
- 'main'
- 'master'
- 'develop'
- 'release*'
tags:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/parachain-node-docker-image.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# This workflow pushes new parachain-node docker images on every new push on main.
# This workflow pushes new parachain-node docker images on every new push on master.
#
# All the images above have support for linux/amd64 and linux/arm64.
#
Expand All @@ -9,7 +9,7 @@ name: "Build and publish Parachain-node Docker image"
on:
push:
branches:
- main
- master

jobs:
build-and-publish:
Expand Down
17 changes: 0 additions & 17 deletions .github/workflows/release.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Test
on:
push:
branches:
- 'main'
- 'master'
- 'release*'

env:
Expand Down
66 changes: 42 additions & 24 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 17 additions & 4 deletions light-clients/ics10-grandpa-cw/src/contract.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,23 @@ impl grandpa_light_client_primitives::HostFunctions for HostFunctions {
}
}

#[entry_point]
pub fn migrate(_deps: DepsMut, _env: Env, _msg: MigrateMsg) -> Result<Response, ContractError> {
// No state migrations performed, just returned a Response
Ok(Response::default())
fn process_instantiate_msg(
msg: InstantiateMessage,
ctx: &mut Context<HostFunctions>,
client_id: ClientId,
) -> Result<Binary, ContractError> {
let any = Any::decode(&mut msg.client_state.as_slice())?;
let client_state = ClientState::decode_vec(&any.value)?;
let any = Any::decode(&mut msg.consensus_state.as_slice())?;
let consensus_state = ConsensusState::decode_vec(&any.value)?;

let height = client_state.latest_height();
ctx.checksum = Some(msg.checksum);
ctx.store_client_state(client_id.clone(), client_state)
.map_err(|e| ContractError::Grandpa(e.to_string()))?;
ctx.store_consensus_state(client_id, height, consensus_state)
.map_err(|e| ContractError::Grandpa(e.to_string()))?;
Ok(to_binary(&ContractResult::success())?)
}

#[cfg_attr(not(feature = "library"), entry_point)]
Expand Down
3 changes: 0 additions & 3 deletions light-clients/ics10-grandpa-cw/src/msg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,6 @@ pub struct ClientStateCallResponse {
pub result: ContractResult,
}

#[cw_serde]
pub struct MigrateMsg {}

#[cw_serde]
pub struct InitializeState {
pub client_state: WasmClientState<FakeInner, FakeInner, FakeInner>,
Expand Down

0 comments on commit 9315a7b

Please sign in to comment.