@@ -12,22 +12,19 @@ use {
1212} ;
1313
1414/// Builder for creating stake accounts with customizable parameters
15- /// Follows the builder pattern for flexibility and readability
1615pub struct StakeAccountBuilder {
1716 lifecycle : StakeLifecycle ,
1817}
1918
2019impl StakeAccountBuilder {
21- /// Build the stake account and return (pubkey, account_data)
2220 pub fn build ( self ) -> ( Pubkey , AccountSharedData ) {
2321 let stake_pubkey = Pubkey :: new_unique ( ) ;
2422 let account = self . lifecycle . create_uninitialized_account ( ) ;
2523 ( stake_pubkey, account)
2624 }
2725}
2826
29- /// Consolidated test context that bundles all common test setup
30- /// This eliminates boilerplate from every test
27+ /// Consolidated test context for stake account tests
3128pub struct StakeTestContext {
3229 pub mollusk : Mollusk ,
3330 pub rent_exempt_reserve : u64 ,
@@ -49,7 +46,6 @@ impl StakeTestContext {
4946 }
5047
5148 /// Create a stake account builder for the specified lifecycle stage
52- /// This is the primary method for creating stake accounts in tests.
5349 ///
5450 /// Example:
5551 /// ```
@@ -61,7 +57,7 @@ impl StakeTestContext {
6157 StakeAccountBuilder { lifecycle }
6258 }
6359
64- /// Process an instruction with a config-based approach
60+ /// Process an instruction
6561 pub fn process_with < ' b , C : InstructionConfig > (
6662 & self ,
6763 config : C ,
@@ -73,7 +69,7 @@ impl StakeTestContext {
7369 )
7470 }
7571
76- /// Internal helper to process an instruction with optional missing signer testing
72+ /// Process an instruction with optional missing signer testing
7773 pub ( crate ) fn process_instruction_maybe_test_signers (
7874 & self ,
7975 instruction : & Instruction ,
0 commit comments