mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 12:02:48 +01:00
d40ac79d4d
… best height ## Issue being fixed or feature implemented Platform wants to know the height of the bestchainlock when they call submitchainlock; sooo we change the API of submitchainlock to also return the height ## What was done? Adjust API and tests ## How Has This Been Tested? New tests added for this behavior ## Breaking Changes Not really any; I **guess** that return value could be considered breaking change; but going from nothing -> something feels unlikely to break anything although it in theory could. ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [ ] 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: UdjinM6 <UdjinM6@users.noreply.github.com> Co-authored-by: Konstantin Akimov <knstqq@gmail.com>
793 B
793 B
RPC Changes
submitchainlock
RPC method updates
- Return Value Addition: The method now returns the height of the current best ChainLock, allowing clients to easily compare the provided ChainLock height with the current best one.
- Error Handling: Added a check for the provided block height. If the block height is not greater than the height of the current best ChainLock, the method will return the best ChainLock's height without attempting to process a new ChainLock.
- Code Optimization: Refactored the retrieval of the
LLMQContext
and the best ChainLock's height to occur before the signature validation. This change streamlines the logic and potentially reduces redundant computations when the provided block height is already known to be not the best.