Bump bpf-tools version to 1.9

- upgrade rustc to 1.52.1 and clang to 12.0
This commit is contained in:
Dmitri Makarov
2021-05-18 19:44:36 +02:00
committed by Justin Starry
parent 9bc20a8cbb
commit cde248ae73
6 changed files with 23 additions and 22 deletions

View File

@@ -135,7 +135,7 @@ pub fn hashv(vals: &[&[u8]]) -> Hash {
{
extern "C" {
fn sol_sha256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64;
};
}
let mut hash_result = [0; HASH_BYTES];
unsafe {
sol_sha256(

View File

@@ -133,7 +133,7 @@ pub fn hashv(vals: &[&[u8]]) -> Hash {
{
extern "C" {
fn sol_keccak256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64;
};
}
let mut hash_result = [0; HASH_BYTES];
unsafe {
sol_keccak256(

View File

@@ -244,7 +244,7 @@ impl Pubkey {
program_id_addr: *const u8,
address_bytes_addr: *const u8,
) -> u64;
};
}
let mut bytes = [0; 32];
let result = unsafe {
sol_create_program_address(
@@ -327,7 +327,7 @@ impl Pubkey {
address_bytes_addr: *const u8,
bump_seed_addr: *const u8,
) -> u64;
};
}
let mut bytes = [0; 32];
let mut bump_seed = std::u8::MAX;
let result = unsafe {
@@ -360,7 +360,7 @@ impl Pubkey {
{
extern "C" {
fn sol_log_pubkey(pubkey_addr: *const u8);
};
}
unsafe { sol_log_pubkey(self.as_ref() as *const _ as *const u8) };
}