34
34
solana_sdk:: transaction:: TransactionError ,
35
35
} ;
36
36
37
- const UPPER_BOUND_OF_ALL_ACCOUNT_SIZES : usize = 20536 ;
37
+ const UPPER_BOUND_OF_ALL_ACCOUNT_SIZES : usize = 160056 ;
38
38
39
39
/// The goal of this struct is to easily instantiate fresh solana accounts
40
40
/// for the Pyth program to use in tests.
@@ -50,7 +50,7 @@ pub struct AccountSetup {
50
50
owner : Pubkey ,
51
51
balance : u64 ,
52
52
size : usize ,
53
- data : [ u8 ; UPPER_BOUND_OF_ALL_ACCOUNT_SIZES ] ,
53
+ data : Vec < u8 > ,
54
54
}
55
55
56
56
impl AccountSetup {
@@ -59,7 +59,7 @@ impl AccountSetup {
59
59
let owner = * owner;
60
60
let balance = Rent :: minimum_balance ( & Rent :: default ( ) , T :: MINIMUM_SIZE ) ;
61
61
let size = T :: MINIMUM_SIZE ;
62
- let data = [ 0 ; UPPER_BOUND_OF_ALL_ACCOUNT_SIZES ] ;
62
+ let data = vec ! [ 0 ; UPPER_BOUND_OF_ALL_ACCOUNT_SIZES ] ;
63
63
AccountSetup {
64
64
key,
65
65
owner,
@@ -74,7 +74,7 @@ impl AccountSetup {
74
74
let owner = system_program:: id ( ) ;
75
75
let balance = LAMPORTS_PER_SOL ;
76
76
let size = 0 ;
77
- let data = [ 0 ; UPPER_BOUND_OF_ALL_ACCOUNT_SIZES ] ;
77
+ let data = vec ! [ 0 ; UPPER_BOUND_OF_ALL_ACCOUNT_SIZES ] ;
78
78
AccountSetup {
79
79
key,
80
80
owner,
@@ -89,7 +89,7 @@ impl AccountSetup {
89
89
let owner = * owner;
90
90
let balance = Rent :: minimum_balance ( & Rent :: default ( ) , PermissionAccount :: MINIMUM_SIZE ) ;
91
91
let size = PermissionAccount :: MINIMUM_SIZE ;
92
- let data = [ 0 ; UPPER_BOUND_OF_ALL_ACCOUNT_SIZES ] ;
92
+ let data = vec ! [ 0 ; UPPER_BOUND_OF_ALL_ACCOUNT_SIZES ] ;
93
93
AccountSetup {
94
94
key,
95
95
owner,
@@ -104,7 +104,7 @@ impl AccountSetup {
104
104
let owner = sysvar:: id ( ) ;
105
105
let balance = Rent :: minimum_balance ( & Rent :: default ( ) , clock:: Clock :: size_of ( ) ) ;
106
106
let size = clock:: Clock :: size_of ( ) ;
107
- let data = [ 0u8 ; UPPER_BOUND_OF_ALL_ACCOUNT_SIZES ] ;
107
+ let data = vec ! [ 0u8 ; UPPER_BOUND_OF_ALL_ACCOUNT_SIZES ] ;
108
108
AccountSetup {
109
109
key,
110
110
owner,
0 commit comments