Skip to content

Commit 010db5b

Browse files
authored
feat(sns): neuron SetFollowing command is validated in isolation (#4543)
This PR adds validation for the recently added neuron `SetFollowing` command (which is still disabled). The validation is based on global topic following invariants, but does not yet take into potential account existing topic-based following that a neuron might have; that will be added in a follow-up PR. | [Next PR](#4563) >
1 parent cf299c9 commit 010db5b

File tree

12 files changed

+1172
-29
lines changed

12 files changed

+1172
-29
lines changed

Cargo.lock

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rs/sns/governance/BUILD.bazel

+1
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ DEPENDENCIES = [
6666
"@crate_index//:serde_bytes",
6767
"@crate_index//:serde_json",
6868
"@crate_index//:strum",
69+
"@crate_index//:thiserror",
6970
]
7071

7172
MACRO_DEPENDENCIES = [

rs/sns/governance/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ serde_json = { workspace = true }
8484
strum = { workspace = true }
8585
strum_macros = { workspace = true }
8686
canbench-rs = { version = "0.1.7", optional = true }
87+
thiserror = { workspace = true }
8788

8889
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
8990
ic-types = { path = "../../types/types" }

rs/sns/governance/protobuf_generator/src/lib.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,12 @@ pub fn generate_prost_files(proto: ProtoPaths<'_>, out: &Path) {
5656
};
5757
apply_attribute(
5858
"#[derive(strum_macros::EnumIter)]",
59-
vec!["Governance.Mode", "NeuronPermissionType", "Proposal.action"],
59+
vec![
60+
"Governance.Mode",
61+
"NeuronPermissionType",
62+
"Proposal.action",
63+
"Topic",
64+
],
6065
);
6166
apply_attribute(
6267
"#[derive(serde::Serialize)]",

0 commit comments

Comments
 (0)