@@ -454,61 +454,6 @@ mod tests {
454454 use solana_sdk:: pubkey:: Pubkey ;
455455 use std:: str:: FromStr ;
456456
457- #[ test]
458- pub fn test_loosing_account_write ( ) {
459- let owner = Pubkey :: from_str ( "675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8" ) . unwrap ( ) ;
460- let my_account = Pubkey :: new_unique ( ) ;
461- let mut chain_data = ChainData :: new ( ) ;
462-
463- chain_data. update_account (
464- my_account,
465- AccountData {
466- slot : 123 ,
467- write_version : 1 ,
468- account : AccountSharedData :: new ( 100 , 100 /*space*/ , & owner) ,
469- } ,
470- j,
471- ) ;
472-
473- chain_data. update_slot ( SlotData {
474- slot : 123 ,
475- parent : None ,
476- status : SlotStatus :: Rooted , // =finalized
477- chain : 0 ,
478- } ) ;
479-
480- chain_data. update_account (
481- my_account,
482- AccountData {
483- slot : 128 ,
484- write_version : 1 ,
485- account : AccountSharedData :: new ( 101 , 101 /*space*/ , & owner) ,
486- } ,
487- ) ;
488-
489- chain_data. update_slot ( SlotData {
490- slot : 128 ,
491- parent : Some ( 123 ) ,
492- status : SlotStatus :: Processed ,
493- chain : 0 ,
494- } ) ;
495-
496- assert_eq ! ( chain_data. newest_rooted_slot( ) , 123 ) ;
497- assert_eq ! ( chain_data. best_chain_slot( ) , 128 ) ;
498- assert_eq ! ( chain_data. account( & my_account) . unwrap( ) . slot, 128 ) ;
499-
500- chain_data. update_slot ( SlotData {
501- slot : 129 ,
502- parent : Some ( 128 ) ,
503- status : SlotStatus :: Processed ,
504- chain : 0 ,
505- } ) ;
506-
507- assert_eq ! ( chain_data. newest_rooted_slot( ) , 123 ) ;
508- assert_eq ! ( chain_data. best_chain_slot( ) , 129 ) ;
509- assert_eq ! ( chain_data. account( & my_account) . unwrap( ) . slot, 128 ) ;
510- }
511-
512457 #[ test]
513458 #[ ignore]
514459 pub fn test_try_to_reproduce_weird_thing ( ) {
0 commit comments