File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -3060,6 +3060,13 @@ mod tests {
3060
3060
}
3061
3061
3062
3062
let mut all_accounts = mock_bank. accounts_map . keys ( ) . copied ( ) . collect :: < Vec < _ > > ( ) ;
3063
+
3064
+ // append some to-be-created accounts
3065
+ // this is to test that their size is 0 rather than 64
3066
+ for _ in 0 ..32 {
3067
+ all_accounts. push ( Pubkey :: new_unique ( ) ) ;
3068
+ }
3069
+
3063
3070
let mut account_loader = ( & mock_bank) . into ( ) ;
3064
3071
3065
3072
// now generate arbitrary transactions using this accounts
@@ -3112,8 +3119,9 @@ mod tests {
3112
3119
. collect :: < AHashSet < _ > > ( ) ;
3113
3120
3114
3121
for pubkey in transaction. account_keys ( ) . iter ( ) {
3115
- let account = mock_bank. accounts_map . get ( pubkey) . unwrap ( ) ;
3116
- expected_size += TRANSACTION_ACCOUNT_BASE_SIZE + account. data ( ) . len ( ) ;
3122
+ if let Some ( account) = mock_bank. accounts_map . get ( pubkey) {
3123
+ expected_size += TRANSACTION_ACCOUNT_BASE_SIZE + account. data ( ) . len ( ) ;
3124
+ } ;
3117
3125
3118
3126
if let Some ( ( programdata_address, programdata_size) ) =
3119
3127
programdata_tracker. get ( pubkey)
You can’t perform that action at this time.
0 commit comments