This partially reverts commit f8842032c6
.
Apparently CI runs for
https://github.com/solana-labs/solana/pull/25380
https://github.com/solana-labs/solana/pull/25429
have interleaved each other resulting in a broken master.
This commit is contained in:
parent
c3cb1c9897
commit
9e8a05ce47
|
@ -183,14 +183,14 @@ pub fn deserialize_parameters_unaligned(
|
||||||
start += size_of::<u8>(); // is_signer
|
start += size_of::<u8>(); // is_signer
|
||||||
start += size_of::<u8>(); // is_writable
|
start += size_of::<u8>(); // is_writable
|
||||||
start += size_of::<Pubkey>(); // key
|
start += size_of::<Pubkey>(); // key
|
||||||
borrowed_account.set_lamports(LittleEndian::read_u64(
|
let _ = borrowed_account.set_lamports(LittleEndian::read_u64(
|
||||||
buffer
|
buffer
|
||||||
.get(start..)
|
.get(start..)
|
||||||
.ok_or(InstructionError::InvalidArgument)?,
|
.ok_or(InstructionError::InvalidArgument)?,
|
||||||
));
|
));
|
||||||
start += size_of::<u64>() // lamports
|
start += size_of::<u64>() // lamports
|
||||||
+ size_of::<u64>(); // data length
|
+ size_of::<u64>(); // data length
|
||||||
borrowed_account.set_data(
|
let _ = borrowed_account.set_data(
|
||||||
buffer
|
buffer
|
||||||
.get(start..start + pre_len)
|
.get(start..start + pre_len)
|
||||||
.ok_or(InstructionError::InvalidArgument)?,
|
.ok_or(InstructionError::InvalidArgument)?,
|
||||||
|
@ -324,13 +324,13 @@ pub fn deserialize_parameters_aligned(
|
||||||
+ size_of::<u8>() // executable
|
+ size_of::<u8>() // executable
|
||||||
+ 4 // padding to 128-bit aligned
|
+ 4 // padding to 128-bit aligned
|
||||||
+ size_of::<Pubkey>(); // key
|
+ size_of::<Pubkey>(); // key
|
||||||
borrowed_account.set_owner(
|
let _ = borrowed_account.set_owner(
|
||||||
buffer
|
buffer
|
||||||
.get(start..start + size_of::<Pubkey>())
|
.get(start..start + size_of::<Pubkey>())
|
||||||
.ok_or(InstructionError::InvalidArgument)?,
|
.ok_or(InstructionError::InvalidArgument)?,
|
||||||
);
|
);
|
||||||
start += size_of::<Pubkey>(); // owner
|
start += size_of::<Pubkey>(); // owner
|
||||||
borrowed_account.set_lamports(LittleEndian::read_u64(
|
let _ = borrowed_account.set_lamports(LittleEndian::read_u64(
|
||||||
buffer
|
buffer
|
||||||
.get(start..)
|
.get(start..)
|
||||||
.ok_or(InstructionError::InvalidArgument)?,
|
.ok_or(InstructionError::InvalidArgument)?,
|
||||||
|
@ -358,7 +358,7 @@ pub fn deserialize_parameters_aligned(
|
||||||
}
|
}
|
||||||
data_end
|
data_end
|
||||||
};
|
};
|
||||||
borrowed_account.set_data(
|
let _ = borrowed_account.set_data(
|
||||||
buffer
|
buffer
|
||||||
.get(start..data_end)
|
.get(start..data_end)
|
||||||
.ok_or(InstructionError::InvalidArgument)?,
|
.ok_or(InstructionError::InvalidArgument)?,
|
||||||
|
@ -575,7 +575,7 @@ mod tests {
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.1
|
.1
|
||||||
.set_owner(bpf_loader_deprecated::id());
|
.set_owner(bpf_loader_deprecated::id());
|
||||||
invoke_context
|
let _ = invoke_context
|
||||||
.transaction_context
|
.transaction_context
|
||||||
.get_current_instruction_context()
|
.get_current_instruction_context()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
|
|
Loading…
Reference in New Issue