Skip to content

Commit 771e8be

Browse files
Chore/prevent commits on accounts delegated on system program (#114)
* chore: prevents commit on account delegated to system program * chore: fmt
1 parent c178510 commit 771e8be

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/processor/fast/commit_state.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,9 +163,7 @@ pub(crate) fn process_commit_state_internal(
163163
.map_err(to_pinocchio_program_error)?;
164164

165165
// Check that the authority is allowed to commit
166-
if !pubkey_eq(delegation_record.authority.as_array(), args.validator.key())
167-
&& !pubkey_eq(delegation_record.authority.as_array(), &Pubkey::default())
168-
{
166+
if !pubkey_eq(delegation_record.authority.as_array(), args.validator.key()) {
169167
log!("validator is not the delegation authority. validator: ");
170168
pubkey::log(args.validator.key());
171169
log!("delegation authority: ");

0 commit comments

Comments
 (0)