mirror of
https://github.com/dashpay/dash.git
synced 2024-12-27 04:52:59 +01:00
563cc34b4e
## Issue being fixed or feature implemented Platform in the scope of credit withdrawals, need a way to get the status of an Asset Unlock by index. ## What was done? A new RPC was created `getassetunlockchainlocks` that accepts Asset Unlock indexes array as parameter and return corresponding status for each index. The possible outcomes per each index are: - `chainlocked`: If the Asset Unlock index is mined on a Chainlocked block. - `mined`: If no Chainlock information is available, and the Asset Unlock index is mined. - `mempooled`: If the Asset Unlock index is in the mempool. - `unknown`: If none of the above are valid. Note: This RPC is whitelisted for the Platform RPC user. ## How Has This Been Tested? Inserted on `feature_asset_locks.py` covering cases where Asset Unlock txs are in mempool, mined and not present. ## Breaking Changes no ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [x] I have added or updated relevant unit/integration/functional/e2e tests - [x] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ --------- Co-authored-by: thephez <thephez@users.noreply.github.com> Co-authored-by: Konstantin Akimov <knstqq@gmail.com> Co-authored-by: PastaPastaPasta <6443210+PastaPastaPasta@users.noreply.github.com> Co-authored-by: pasta <pasta@dashboost.org>
556 B
556 B
Added RPC
getassetunlockstatuses
RPC allows fetching of Asset Unlock txs by their withdrawal index. The RPC accepts an array of indexes and returns status for each index. The possible outcomes per each index are:- "chainlocked": If the Asset Unlock index is mined on a ChainLocked block.
- "mined": If no ChainLock information is available, and the Asset Unlock index is mined.
- "mempooled": If the Asset Unlock index is in the mempool.
- "unknown": If none of the above are valid.
Note: This RPC is whitelisted for the Platform RPC user.