Skip to content

Commit

Permalink
partially reverts solana-labs#25429 (solana-labs#25466)
Browse files Browse the repository at this point in the history
This partially reverts commit f884203.

Apparently CI runs for
solana-labs#25380
solana-labs#25429
have interleaved each other resulting in a broken master.
  • Loading branch information
behzadnouri authored and jeffwashington committed Jun 29, 2022
1 parent 3dc0f03 commit e39bdbe
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions programs/bpf_loader/src/serialization.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ pub fn deserialize_parameters_unaligned(
start += size_of::<u8>(); // is_signer
start += size_of::<u8>(); // is_writable
start += size_of::<Pubkey>(); // key
borrowed_account.set_lamports(LittleEndian::read_u64(
let _ = borrowed_account.set_lamports(LittleEndian::read_u64(
buffer
.get(start..)
.ok_or(InstructionError::InvalidArgument)?,
));
start += size_of::<u64>() // lamports
+ size_of::<u64>(); // data length
borrowed_account.set_data(
let _ = borrowed_account.set_data(
buffer
.get(start..start + pre_len)
.ok_or(InstructionError::InvalidArgument)?,
Expand Down Expand Up @@ -324,13 +324,13 @@ pub fn deserialize_parameters_aligned(
+ size_of::<u8>() // executable
+ 4 // padding to 128-bit aligned
+ size_of::<Pubkey>(); // key
borrowed_account.set_owner(
let _ = borrowed_account.set_owner(
buffer
.get(start..start + size_of::<Pubkey>())
.ok_or(InstructionError::InvalidArgument)?,
);
start += size_of::<Pubkey>(); // owner
borrowed_account.set_lamports(LittleEndian::read_u64(
let _ = borrowed_account.set_lamports(LittleEndian::read_u64(
buffer
.get(start..)
.ok_or(InstructionError::InvalidArgument)?,
Expand Down Expand Up @@ -358,7 +358,7 @@ pub fn deserialize_parameters_aligned(
}
data_end
};
borrowed_account.set_data(
let _ = borrowed_account.set_data(
buffer
.get(start..data_end)
.ok_or(InstructionError::InvalidArgument)?,
Expand Down Expand Up @@ -575,7 +575,7 @@ mod tests {
.unwrap()
.1
.set_owner(bpf_loader_deprecated::id());
invoke_context
let _ = invoke_context
.transaction_context
.get_current_instruction_context()
.unwrap()
Expand Down

0 comments on commit e39bdbe

Please sign in to comment.