forked from bitcoin/bitcoin
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(rpc): added optional block height in
getassetunlockstatuses
(#…
…5849) ## Issue being fixed or feature implemented RPC `getassetunlockstatuses` is now accepting an extra optional parameter `height`. When a valid `height` is passed, then the RPC returns the status of AssetUnlock indexes up to this specific block. (Requested by Platform team) ## What was done? Note that in order to avoid cases that can lead to deterministic result, when `height` is passed, then the only `chainlocked` and `unknown` outcomes are possible. ## How Has This Been Tested? `feature_asset_locks.py` was updated. ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] 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: Konstantin Akimov <[email protected]> Co-authored-by: UdjinM6 <[email protected]>
- Loading branch information
1 parent
2238e03
commit 82310b0
Showing
4 changed files
with
59 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
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. | ||
- `getassetunlockstatuses` RPC allows fetching of Asset Unlock txs by their withdrawal index. | ||
The RPC accepts an array of indexes and an optional block height. | ||
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. | ||
- `chainlocked`: If the Asset Unlock index is mined on a ChainLocked block or up to the given block height. | ||
- `mined`: If no ChainLock information is available for the mined Asset Unlock index. | ||
- `mempooled`: If the Asset Unlock index is in the mempool. | ||
- `unknown`: If none of the above are valid. | ||
|
||
Note: If a specific block height is passed on request, then only `chainlocked` and `unknown` outcomes are possible. | ||
|
||
Note: This RPC is whitelisted for the Platform RPC user. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters