diff --git a/Cargo.lock b/Cargo.lock index 2193a77..5482334 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4220,7 +4220,7 @@ dependencies = [ "solana-sdk", "solana-signer", "solana-system-interface 3.1.0", - "solana-transaction 3.1.0", + "solana-transaction 4.0.0", "tokio", ] @@ -4240,7 +4240,7 @@ dependencies = [ "solana-sdk", "solana-signer", "solana-system-interface 3.1.0", - "solana-transaction 3.1.0", + "solana-transaction 4.0.0", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index 0d2fbd9..faacaf0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,7 +35,7 @@ solana-pubkey = "4.1.0" solana-sdk = "4.0.1" solana-signer = "3.0.0" solana-system-interface = "3.1.0" -solana-transaction = "3.1.0" +solana-transaction = "4.0.0" tokio = { version = "1", features = ["full"] } [profile.release] diff --git a/resq-airspace/src/state/airspace_account.rs b/resq-airspace/src/state/airspace_account.rs index 724fbe4..a55025b 100644 --- a/resq-airspace/src/state/airspace_account.rs +++ b/resq-airspace/src/state/airspace_account.rs @@ -17,16 +17,22 @@ use anchor_lang::prelude::*; /// Access policy for an airspace envelope. +/// +/// Variants are serialised by their implicit discriminant (Open=0, Permit=1, +/// Deny=2, Auction=3). The explicit `= N` values were removed to satisfy +/// borsh 1.x which requires `#[borsh(use_discriminant)]` for enums with +/// explicit discriminants — an annotation that Anchor 1.x derive macros do +/// not yet forward correctly. Wire format is unchanged. #[derive(AnchorSerialize, AnchorDeserialize, Clone, Copy, PartialEq, Eq, Debug)] pub enum AccessPolicy { - /// Any drone may transit without a permit or fee. - Open = 0, - /// A drone must hold a valid `Permit` account to transit. - Permit = 1, - /// No drone may transit under any circumstances. - Deny = 2, - /// Crossing fee is determined by an on-chain auction (future feature). - Auction = 3, + /// Any drone may transit without a permit or fee. (discriminant = 0) + Open, + /// A drone must hold a valid `Permit` account to transit. (discriminant = 1) + Permit, + /// No drone may transit under any circumstances. (discriminant = 2) + Deny, + /// Crossing fee is determined by an on-chain auction (future feature). (discriminant = 3) + Auction, } impl Default for AccessPolicy {