Skip to content

Commit a908ffe

Browse files
committed
Make linter happy.
1 parent 34d2074 commit a908ffe

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

vote-interface/src/state/vote_instruction_data.rs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
#[cfg(feature = "serde")]
2-
use {
3-
serde_derive::{Deserialize, Serialize},
4-
serde_with::serde_as,
5-
};
61
#[cfg(feature = "frozen-abi")]
72
use solana_frozen_abi_macro::{frozen_abi, AbiExample};
83
use {
@@ -14,6 +9,11 @@ use {
149
solana_pubkey::Pubkey,
1510
std::{collections::VecDeque, fmt::Debug},
1611
};
12+
#[cfg(feature = "serde")]
13+
use {
14+
serde_derive::{Deserialize, Serialize},
15+
serde_with::serde_as,
16+
};
1717

1818
#[cfg_attr(
1919
feature = "frozen-abi",
@@ -212,7 +212,10 @@ pub struct VoteInit {
212212
pub struct VoteInitV2 {
213213
pub node_pubkey: Pubkey,
214214
pub authorized_voter: Pubkey,
215-
#[cfg_attr(feature = "serde", serde_as(as = "[_; BLS_PUBLIC_KEY_COMPRESSED_SIZE]"))]
215+
#[cfg_attr(
216+
feature = "serde",
217+
serde_as(as = "[_; BLS_PUBLIC_KEY_COMPRESSED_SIZE]")
218+
)]
216219
pub authorized_voter_bls_pubkey: [u8; BLS_PUBLIC_KEY_COMPRESSED_SIZE],
217220
#[cfg_attr(feature = "serde", serde_as(as = "[_; BLS_SIGNATURE_COMPRESSED_SIZE]"))]
218221
pub authorized_voter_bls_proof_of_possession: [u8; BLS_SIGNATURE_COMPRESSED_SIZE],
@@ -243,7 +246,10 @@ impl Default for VoteInitV2 {
243246
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
244247
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
245248
pub struct VoterWithBLSArgs {
246-
#[cfg_attr(feature = "serde", serde_as(as = "[_; BLS_PUBLIC_KEY_COMPRESSED_SIZE]"))]
249+
#[cfg_attr(
250+
feature = "serde",
251+
serde_as(as = "[_; BLS_PUBLIC_KEY_COMPRESSED_SIZE]")
252+
)]
247253
pub bls_pub_key: [u8; BLS_PUBLIC_KEY_COMPRESSED_SIZE],
248254
#[cfg_attr(feature = "serde", serde_as(as = "[_; BLS_SIGNATURE_COMPRESSED_SIZE]"))]
249255
pub bls_proof_of_possession: [u8; BLS_SIGNATURE_COMPRESSED_SIZE],

vote-interface/src/state/vote_state_v4.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ impl VoteStateV4 {
9696
Self {
9797
node_pubkey: vote_init.node_pubkey,
9898
authorized_voters: AuthorizedVoters::new(clock.epoch, vote_init.authorized_voter),
99-
bls_pubkey_compressed: Some(vote_init.authorized_voter_bls_pubkey.into()),
99+
bls_pubkey_compressed: Some(vote_init.authorized_voter_bls_pubkey),
100100
authorized_withdrawer: vote_init.authorized_withdrawer,
101101
inflation_rewards_commission_bps: vote_init.inflation_rewards_commission_bps,
102102
inflation_rewards_collector: vote_init.inflation_rewards_collector,

0 commit comments

Comments
 (0)