File tree 3 files changed +5
-5
lines changed
3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ mod syscalls;
8
8
pub use syscalls:: * ;
9
9
10
10
/// Number of bytes in an address.
11
- pub const PUBKEY_BYTES : usize = 32 ;
11
+ pub const ADDRESS_BYTES : usize = 32 ;
12
12
13
13
/// Maximum length of derived `Address` seed.
14
14
pub const MAX_SEED_LEN : usize = 32 ;
@@ -27,4 +27,4 @@ pub const MAX_SEEDS: usize = 16;
27
27
/// [account]: https://solana.com/docs/core/accounts
28
28
/// [ed25519]: https://ed25519.cr.yp.to/
29
29
/// [pdas]: https://solana.com/docs/core/cpi#program-derived-addresses
30
- pub type Address = [ u8 ; PUBKEY_BYTES ] ;
30
+ pub type Address = [ u8 ; ADDRESS_BYTES ] ;
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ pub fn try_find_program_address(
112
112
) -> Result < ( Address , u8 ) , ProgramError > {
113
113
#[ cfg( target_os = "solana" ) ]
114
114
{
115
- let mut bytes = core:: mem:: MaybeUninit :: < [ u8 ; crate :: PUBKEY_BYTES ] > :: uninit ( ) ;
115
+ let mut bytes = core:: mem:: MaybeUninit :: < [ u8 ; crate :: ADDRESS_BYTES ] > :: uninit ( ) ;
116
116
let mut bump_seed = u8:: MAX ;
117
117
118
118
let result = unsafe {
@@ -164,7 +164,7 @@ pub fn try_create_program_address(
164
164
// Call via a system call to perform the calculation
165
165
#[ cfg( target_os = "solana" ) ]
166
166
{
167
- let mut bytes = core:: mem:: MaybeUninit :: < [ u8 ; crate :: PUBKEY_BYTES ] > :: uninit ( ) ;
167
+ let mut bytes = core:: mem:: MaybeUninit :: < [ u8 ; crate :: ADDRESS_BYTES ] > :: uninit ( ) ;
168
168
169
169
let result = unsafe {
170
170
sol_create_program_address (
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use arbitrary::Arbitrary;
12
12
use bytemuck_derive:: { Pod , Zeroable } ;
13
13
#[ cfg( feature = "serde" ) ]
14
14
use serde_derive:: { Deserialize , Serialize } ;
15
- pub use solana_address:: { MAX_SEEDS , MAX_SEED_LEN , PUBKEY_BYTES } ;
15
+ pub use solana_address:: { ADDRESS_BYTES as PUBKEY_BYTES , MAX_SEEDS , MAX_SEED_LEN } ;
16
16
#[ cfg( any( feature = "std" , target_arch = "wasm32" ) ) ]
17
17
use std:: vec:: Vec ;
18
18
#[ cfg( feature = "borsh" ) ]
You can’t perform that action at this time.
0 commit comments