Skip to content

Commit

Permalink
Runtime: Core BPF Migration: Setup migration configurations (anza-xyz…
Browse files Browse the repository at this point in the history
…#525)

* runtime: builtins: add `core_bpf_migration_config` to prototypes

* runtime: builtins: set up test builtins

* macro-ize builtin testing
  • Loading branch information
buffalojoec authored Apr 4, 2024
1 parent 526979d commit 87fc227
Show file tree
Hide file tree
Showing 3 changed files with 330 additions and 39 deletions.
4 changes: 2 additions & 2 deletions runtime/src/bank/builtins/core_bpf_migration/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use {
/// Identifies the type of built-in program targeted for Core BPF migration.
/// The type of target determines whether the program should have a program
/// account or not, which is checked before migration.
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub(crate) enum CoreBpfMigrationTargetType {
/// A standard (stateful) builtin program must have a program account.
Builtin,
Expand All @@ -36,7 +36,7 @@ pub(crate) enum CoreBpfMigrationTargetType {
}

/// Configuration for migrating a built-in program to Core BPF.
#[derive(Debug)]
#[derive(Debug, PartialEq)]
pub(crate) struct CoreBpfMigrationConfig {
/// The program ID of the source program to be used to replace the builtin.
pub source_program_id: Pubkey,
Expand Down
Loading

0 comments on commit 87fc227

Please sign in to comment.