From f129ec6bd79115d512889044031558ebfb564377 Mon Sep 17 00:00:00 2001 From: Adam Spofford Date: Wed, 11 Dec 2024 04:57:21 -0800 Subject: [PATCH] Add command to refresh following --- CHANGELOG.md | 2 ++ src/commands/neuron_manage.rs | 17 ++++++++++++++++- .../default/neuron_manage/refresh_followers.txt | 15 +++++++++++++++ tests/output/neuron_manage.rs | 6 ++++++ 4 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 tests/output/default/neuron_manage/refresh_followers.txt diff --git a/CHANGELOG.md b/CHANGELOG.md index a0caae6..cb82f4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +- Added `quill neuron-manage --refresh-followers`. + ## [0.5.2] - 2024-12-05 - Fixed the display format of SNS sale tickets. diff --git a/src/commands/neuron_manage.rs b/src/commands/neuron_manage.rs index ba8d21c..ddc67cf 100644 --- a/src/commands/neuron_manage.rs +++ b/src/commands/neuron_manage.rs @@ -9,6 +9,7 @@ use candid::{CandidType, Encode, Principal}; use clap::{Parser, ValueEnum}; use ic_base_types::PrincipalId; use ic_nns_common::pb::v1::{NeuronId, ProposalId}; +use ic_nns_governance::pb::v1::manage_neuron::RefreshVotingPower; use ic_nns_governance::pb::v1::{ manage_neuron::{ configure::Operation, disburse::Amount, AddHotKey, ChangeAutoStakeMaturity, Command, @@ -138,6 +139,11 @@ pub struct ManageOpts { /// a limited subset (Private). #[arg(long)] set_visibility: Option, + + /// Refresh the neuron's voting power by reaffirming the current list of followers. + /// This must be done every so often to avoid neurons diminishing in voting power. + #[arg(long)] + refresh_followers: bool, } #[derive(Debug, Clone, Copy, PartialEq, Eq, ValueEnum)] @@ -152,7 +158,7 @@ pub fn exec(auth: &AuthInfo, opts: ManageOpts) -> AnyhowResult