Skip to content

processor: assign#45

Merged
buffalojoec merged 1 commit intomainfrom
processor3
Mar 11, 2025
Merged

processor: assign#45
buffalojoec merged 1 commit intomainfrom
processor3

Conversation

@buffalojoec
Copy link
Contributor

This PR implements the Assign instruction processor in the BPF version of the System builtin program.

See #38 for a draft overview of the implemented base processor (no nonce instructions).

@buffalojoec buffalojoec marked this pull request as ready for review March 7, 2025 12:15
Copy link
Contributor

@joncinque joncinque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a flyby, looks good to me!

Comment on lines +42 to +61
#[test]
fn success_already_assigned() {
let mollusk = setup::setup();

let pubkey = Pubkey::new_unique();

let account = Account {
owner: OWNER, // Already assigned
..Account::default()
};

mollusk.process_and_validate_instruction(
&assign(&pubkey, &OWNER),
&[(pubkey, account)],
&[
Check::success(),
Check::account(&pubkey).owner(&OWNER).build(),
],
);
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behavior is wild 😅

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps a bit gratuitous, but gud tests all around.

@buffalojoec buffalojoec merged commit 17d70bc into main Mar 11, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants