Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Decode native-program and sysvar accounts #11463

Merged
merged 6 commits into from
Aug 9, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Review comments
  • Loading branch information
Tyera Eulberg committed Aug 9, 2020
commit 9855765f003fd5abac5784a3b37bb5c78e01d1cd
6 changes: 3 additions & 3 deletions account-decoder/src/parse_stake.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ impl From<Stake> for UiStake {
#[derive(Debug, Serialize, Deserialize, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct UiDelegation {
pub voter_pubkey: String,
pub voter: String,
pub stake: u64,
pub activation_epoch: Epoch,
pub deactivation_epoch: Epoch,
Expand All @@ -118,7 +118,7 @@ pub struct UiDelegation {
impl From<Delegation> for UiDelegation {
fn from(delegation: Delegation) -> Self {
Self {
voter_pubkey: delegation.voter_pubkey.to_string(),
voter: delegation.voter_pubkey.to_string(),
stake: delegation.stake,
activation_epoch: delegation.activation_epoch,
deactivation_epoch: delegation.deactivation_epoch,
Expand Down Expand Up @@ -208,7 +208,7 @@ mod test {
},
stake: Some(UiStake {
delegation: UiDelegation {
voter_pubkey: voter_pubkey.to_string(),
voter: voter_pubkey.to_string(),
stake: 20,
activation_epoch: 2,
deactivation_epoch: std::u64::MAX,
Expand Down
2 changes: 0 additions & 2 deletions account-decoder/src/parse_sysvar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,6 @@ pub enum SysvarAccountType {
#[serde(rename_all = "camelCase")]
pub struct UiClock {
pub slot: Slot,
pub unused: u64,
pub epoch: Epoch,
pub leader_schedule_epoch: Epoch,
pub unix_timestamp: UnixTimestamp,
Expand All @@ -112,7 +111,6 @@ impl From<Clock> for UiClock {
fn from(clock: Clock) -> Self {
Self {
slot: clock.slot,
unused: clock.unused,
epoch: clock.epoch,
leader_schedule_epoch: clock.leader_schedule_epoch,
unix_timestamp: clock.unix_timestamp,
Expand Down