Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
22 changes: 14 additions & 8 deletions resq-airspace/src/state/airspace_account.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Loading