rippled icon indicating copy to clipboard operation
rippled copied to clipboard

Change by-value to by-reference to persist vote

Open HowardHinnant opened this issue 3 years ago • 0 comments

High Level Overview of Change

Simple bug fix for persisting votes.

Context of Change

This is a fix to a recent fix. It simply changes a value variable to a reference variable. I missed this because I only tested an amendment with a default vote of yes, and the bug only is exposed only with amendments with a default vote of no.

Type of Change

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Refactor (non-breaking change that only restructures code)
  • [ ] Tests (You added tests for code that already exists, or your new feature included in this PR)
  • [ ] Documentation Updates
  • [ ] Release

Test Plan

This was tested by starting rippled and issuing the following commands on the command line:

rippled feature

Observe some amendment with a default vote of no, such as NonFungibleTokensV1_1, is vetoed.

Unveto the amendment with:

rippled feature NonFungibleTokensV1_1 accept

Stop rippled:

rippled stop

Restart rippled and:

rippled feature

Note that the amendment now is listed with "vetoed" : false.

Amendments with a default vote of no can be found in the source file: src/ripple/protocol/impl/Feature.cpp.

HowardHinnant avatar Jul 27 '22 16:07 HowardHinnant