AbstractSDK / cw-orchestrator

All-in-one Rust-based CosmWasm testing, scripting, and deployment tool.
https://orchestrator.abstract.money
GNU General Public License v3.0
75 stars 17 forks source link

Fix state reuse on a new chains #424

Closed Buckram123 closed 2 months ago

Buckram123 commented 2 months ago

Just noticed that there is a bug regarding reused state. State won't be prepared for the writes if new chain is different from the previous one, unless it was prepared before. This PR adds state.prepare(), if Daemon Builder uses existing state

Checklist

cloudflare-pages[bot] commented 2 months ago

Deploying cw-orchestrator with  Cloudflare Pages  Cloudflare Pages

Latest commit: 04034f2
Status: ✅  Deploy successful!
Preview URL: https://6a393f6e.cw-orchestrator.pages.dev
Branch Preview URL: https://buckram-fix-reuse-state-on-n.cw-orchestrator.pages.dev

View logs

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 93.33333% with 1 line in your changes missing coverage. Please review.

Project coverage is 56.1%. Comparing base (20eeaaa) to head (04034f2).

Additional details and impacted files | [Files](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/424?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK) | Coverage Δ | | |---|---|---| | [cw-orch-daemon/src/state.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/424?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fstate.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL3N0YXRlLnJz) | `81.1% <100.0%> (+0.2%)` | :arrow_up: | | [cw-orch-daemon/src/builder.rs](https://app.codecov.io/gh/AbstractSDK/cw-orchestrator/pull/424?src=pr&el=tree&filepath=cw-orch-daemon%2Fsrc%2Fbuilder.rs&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=AbstractSDK#diff-Y3ctb3JjaC1kYWVtb24vc3JjL2J1aWxkZXIucnM=) | `68.4% <90.9%> (+2.4%)` | :arrow_up: |