File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ mod syscalls;
88pub use syscalls:: * ;
99
1010/// Number of bytes in an address.
11- pub const PUBKEY_BYTES : usize = 32 ;
11+ pub const ADDRESS_BYTES : usize = 32 ;
1212
1313/// Maximum length of derived `Address` seed.
1414pub const MAX_SEED_LEN : usize = 32 ;
@@ -27,4 +27,4 @@ pub const MAX_SEEDS: usize = 16;
2727/// [account]: https://solana.com/docs/core/accounts
2828/// [ed25519]: https://ed25519.cr.yp.to/
2929/// [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(
112112) -> Result < ( Address , u8 ) , ProgramError > {
113113 #[ cfg( target_os = "solana" ) ]
114114 {
115- let mut bytes = core:: mem:: MaybeUninit :: < [ u8 ; crate :: PUBKEY_BYTES ] > :: uninit ( ) ;
115+ let mut bytes = core:: mem:: MaybeUninit :: < [ u8 ; crate :: ADDRESS_BYTES ] > :: uninit ( ) ;
116116 let mut bump_seed = u8:: MAX ;
117117
118118 let result = unsafe {
@@ -164,7 +164,7 @@ pub fn try_create_program_address(
164164 // Call via a system call to perform the calculation
165165 #[ cfg( target_os = "solana" ) ]
166166 {
167- let mut bytes = core:: mem:: MaybeUninit :: < [ u8 ; crate :: PUBKEY_BYTES ] > :: uninit ( ) ;
167+ let mut bytes = core:: mem:: MaybeUninit :: < [ u8 ; crate :: ADDRESS_BYTES ] > :: uninit ( ) ;
168168
169169 let result = unsafe {
170170 sol_create_program_address (
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ use arbitrary::Arbitrary;
1212use bytemuck_derive:: { Pod , Zeroable } ;
1313#[ cfg( feature = "serde" ) ]
1414use 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 } ;
1616#[ cfg( any( feature = "std" , target_arch = "wasm32" ) ) ]
1717use std:: vec:: Vec ;
1818#[ cfg( feature = "borsh" ) ]
You can’t perform that action at this time.
0 commit comments