Skip to content

Commit bc04b78

Browse files
committed
Convert warmup/cooldown rate to integers
1 parent 40655b4 commit bc04b78

16 files changed

Lines changed: 1053 additions & 112 deletions

File tree

Cargo.lock

Lines changed: 3 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,6 @@ check-cfg = [
2222

2323
[workspace.metadata.spellcheck]
2424
config = "scripts/spellcheck.toml"
25+
26+
[patch.crates-io]
27+
solana-stake-interface = { path = "interface" }

clients/rust/src/generated/types/delegation.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ pub struct Delegation {
2222
pub stake: u64,
2323
pub activation_epoch: Epoch,
2424
pub deactivation_epoch: Epoch,
25-
pub warmup_cooldown_rate: f64,
25+
pub reserved: [u8; 8],
2626
}

interface/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ serde_json = { version = "1.0", optional = true }
4141
anyhow = "1"
4242
assert_matches = "1.5.0"
4343
bincode = "1.3.3"
44+
proptest = "1.10.0"
4445
serial_test = "3.4.0"
4546
solana-account = { version = "4.0.0", features = ["bincode"] }
4647
solana-borsh = "3.0.0"

interface/idl.json

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -464,11 +464,18 @@
464464
},
465465
{
466466
"kind": "structFieldTypeNode",
467-
"name": "warmupCooldownRate",
467+
"name": "reserved",
468468
"type": {
469-
"endian": "le",
470-
"format": "f64",
471-
"kind": "numberTypeNode"
469+
"count": {
470+
"kind": "fixedCountNode",
471+
"value": 8
472+
},
473+
"item": {
474+
"endian": "le",
475+
"format": "u8",
476+
"kind": "numberTypeNode"
477+
},
478+
"kind": "arrayTypeNode"
472479
}
473480
}
474481
],

interface/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ pub mod state;
1313
#[cfg(feature = "sysvar")]
1414
pub mod sysvar;
1515
pub mod tools;
16+
#[cfg(test)]
17+
mod ulp;
18+
pub mod warmup_cooldown_allowance;
1619

1720
#[cfg(feature = "codama")]
1821
use codama_macros::codama;

0 commit comments

Comments
 (0)