Repository navigation
feat(key-wallet-ffi): expose version 3 provider payouts and share scripts - #1260
Conversation
…ipts From version 3 (DIP-0026) a ProRegTx and ProUpRegTx carry their owner payouts in `payouts` and leave `script_payout` empty, so the typed payload views showed no payout. They now expose the payouts, a shared registration's collateral shares and terms, and a typed ProUpShareTx view. New fields are appended; existing field offsets are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 37 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
Waiting for bot review — coderabbitai not yet. Wait for the missing reviews, or a writer can post |
|
Bots are done — your move: post |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1260 +/- ##
==========================================
+ Coverage 80.50% 80.59% +0.08%
==========================================
Files 291 291
Lines 77463 77663 +200
==========================================
+ Hits 62364 62590 +226
+ Misses 15099 15073 -26
|
|
/self-reviewed |
|
Policy satisfied — this can merge. |
From version 3 (DIP-0026), a ProRegTx and a ProUpRegTx carry their owner payouts in a
payoutslist, andscript_payoutis empty.key-wallet-ffi's typed payload views only exposedscript_payout, so an FFI consumer saw no payout at all for a version 3 registration. It also couldn't see a shared registration's collateral shares, or a ProUpShareTx: that type had only the discriminant (11) and no typed view.This adds:
payouts/payouts_count(script + reward in basis points) onFFIProviderRegistrationPayloadandFFIProviderUpdateRegistrarPayload;FFIProviderRegistrationPayload,has_shared_collateral(Dash Core'sIsShared: at least one share), theshares(amount, refund script, reward script, owner key hash) and the early-leave terms;FFIProviderUpdateSharePayload(pro_tx_hash, share index, reward script), pointed to by a newprovider_update_shareonFFISpecialTransactionPayload.New fields are appended after the existing ones, so existing field offsets don't change. As with the existing scripts, every array and script is owned by its struct and freed with the transaction record. Empty scripts and lists are null with a zero length.
Tested with new unit tests for a version 3 ProRegTx with payouts and two shares, a decoded single-owner version 3 ProRegTx (not shared), a version 3 ProUpRegTx, and a ProUpShareTx, plus null checks on the legacy payload; the
key-wallet-ffisuite passes.🤖 Generated with Claude Code
PR Hygiene ·
9313f62CHANGELOG.md,key-wallet-ffi/src/special_payload.rs) — approved by xdustinfaceWhen every merge requirement is met, the
PR Hygienecheck passes. Reviewer limits do not block merging; other required GitHub checks and protections still apply.