Skip to content

Fix unit test for wormhole address - #52

Merged
vrom911 merged 1 commit into
mainfrom
bugfix/fix_wormhole_address_test
Jun 4, 2025
Merged

vrom911 merged 1 commit into
mainfrom
bugfix/fix_wormhole_address_test

Conversation

@n13

@n13 n13 commented Jun 4, 2025

Copy link
Copy Markdown
Collaborator

fixing unit test for wormhole addresses

@n13 n13 changed the title Update command.rs Fix unit test for wormhole address Jun 4, 2025

@vrom911 vrom911 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏🏼

@vrom911
vrom911 merged commit 2e6f031 into main Jun 4, 2025
@vrom911
vrom911 deleted the bugfix/fix_wormhole_address_test branch June 4, 2025 15:38
n13 added a commit that referenced this pull request Sep 9, 2026
* refactor: drop vesting MinimumPayout and record every pallet transfer

The minimum claim is now one payout quantum (0.01 QTC): non-final claims
still align to 25 QTC for fee-exact leaves, and the final claim pays the
exact remainder. Removes the now-dead dust-reserve logic and
ClaimWouldLeaveDust. All pallet transfers (claims, treasury->pot funding,
pot->treasury refunds) are recorded as wormhole leaves via
transfer_and_record; renamed the error to TransferProofNotRecorded. Adds a
random-schedule/admin-op conservation walk test.

Co-authored-by: Cursor <[email protected]>

* chore: remove unused runtime parameter_types

PreimageBaseDeposit and PreimageByteDeposit were superseded by the
PreimageDeposit Consideration fee model; ReferendumDefaultVotingPeriod and
ReferendumMinEnactmentPeriod are set per-track in TechCollectiveTracksInfo.
None were referenced anywhere.

Co-authored-by: Cursor <[email protected]>

* fix: price every vesting leaf and compile benchmarks

The benchmarking module imported `SaturatedInto` from `sp_runtime::traits`,
which does not exist, so the `runtime-benchmarks` feature gate failed in CI.
Import `SaturatedConversion` instead.

`create_schedule` now records one wormhole leaf and `end_schedule` two, but
the generated weights priced zero and one. Regenerate `weights_generated.rs`
and rebuild the augmentation around a per-call leaf count: subtract the
benchmark's insert-phase tree ops and add the flat marginal insert price,
hash time and PoV per leaf. `retarget_schedule` drops stale tree ops from an
older version that paid out.

Tests pin the exact pot invariant (pot == sum of unpaid obligations + ED)
after every operation, not only the `>=` that `try_state` can enforce.

---------

Co-authored-by: Cursor <[email protected]>
Co-authored-by: Nikolaus Heger <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants