anza-xyz / anza-xyz/platform-tools
Corrupted reference constants
- Ngôn ngữ chính
- Shell
- Star
- 87
- Fork
- 47
- Merge trung bình
- 9 ngày 25 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
```
use pinocchio::{AccountView, Address, ProgramResult, default_allocator, default_panic_handler, program_entrypoint};
pub const KEY_LIST: [([u8; 12], &[&[u8]; 1]); 3] = [
([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], &[&[]]),
([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], &[&[]]),
([1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], &[&[]]),
];
fn process_entrypoint(
program_id: &Address,
accounts: &[AccountView],
instruction_data: &[u8]) -> ProgramResult
{
pinocchio_log::log!("1st pubkey arr {}", format!("{:?}", KEY_LIST[0].0).as_str());
pinocchio_log::log!("2nd pubkey arr {}", format!("{:?}", KEY_LIST[1].0).as_str());
pinocchio_log::log!("3nd pubkey arr {}", format!("{:?}", KEY_LIST[2].0).as_str());
Ok(())
}
program_entrypoint!(process_entrypoint);
default_allocator!();
default_panic_handler!();
```
Running this code snippet in an actual svm (local validator) I get the following logs:
```
> Program logged: "1st pubkey arr [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]"
> Program logged: "2nd pubkey arr [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1]"
> Program logged: "3nd pubkey arr [1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1]"
> Program consumed: 8942 of 200000 compute units
> Program returned success
```
The first one is not corrupted for some reason.
pinocchio = {version="0.10.1", features = ["cpi"]}
pinocchio-log = "0.5.1"
platform-tools v1.47
Also reproduces with --tools-version v1.54
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.