Repository navigation
Cluster Start/Stop improvements - #127
Merged
Merged
Conversation
cleanup rxjava subscriptions when stopping cluster
0xNebulaLumina
referenced
this pull request
in 0xNebulaLumina/java-tron
Mar 8, 2026
…127) Add three parity fixes for UNFREEZE_BALANCE_CONTRACT: 1. Call withdrawReward before unfreeze mutation (freeze.rs): - Reuses compute_delegation_reward_if_enabled from withdraw.rs - Adds delegation reward to Account.allowance via adjustAllowance - Gated by delegation_reward_enabled config flag 2. Add convert() calls before undelegate_v1_optimized (freeze.rs): - When ALLOW_DELEGATE_OPTIMIZATION is enabled, Java calls convert(owner) + convert(receiver) before unDelegate(owner, receiver) - Rust was missing the convert() calls, which migrate legacy blob-style index entries to prefixed key layout 3. Add weight clamping in add_total_*_weight methods (engine.rs): - Java clamps to max(0, newValue) when allowNewReward() is true - Added matching clamping and skip-if-zero optimization Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Why are these changes required?
cluster.shutdown()does not close therx.Observablesand i could not find it anywhere in the documentation that it completes the stream on shutdown.This PR has been tested by:
This has not been tested, i need to setup a cluster to be able to fully test this.
Notes
In this PR i need to verify if the
CompositeSubscriptionis required, maybe thecluster.shutdown()already completes the subscriptions