@@ -87,8 +87,6 @@ pub type NodeResult = DefaultNodeResult;
8787/// type PrepResult = String;
8888/// type ExecResult = bool;
8989///
90- /// fn set_params(&mut self, _params: Self::Params) {}
91- ///
9290/// fn config(&self) -> NodeConfig {
9391/// NodeConfig::minimal() // Use minimal retries for fast execution
9492/// }
@@ -126,7 +124,12 @@ where
126124 type ExecResult : Send + Sync ;
127125
128126 /// Set parameters for the node
129- fn set_params ( & mut self , params : Self :: Params ) ;
127+ ///
128+ /// Default implementation that does nothing. Override this method if your node
129+ /// needs to store or process parameters when they are set.
130+ fn set_params ( & mut self , _params : Self :: Params ) {
131+ // Default implementation does nothing
132+ }
130133
131134 /// Get the node configuration that controls execution behavior
132135 ///
@@ -367,8 +370,6 @@ mod tests {
367370 type PrepResult = String ;
368371 type ExecResult = bool ;
369372
370- fn set_params ( & mut self , _params : Self :: Params ) { }
371-
372373 async fn prep ( & self , _store : & Self :: Storage ) -> Result < Self :: PrepResult , CanoError > {
373374 Ok ( "prepared" . to_string ( ) )
374375 }
@@ -411,8 +412,6 @@ mod tests {
411412 type PrepResult = String ;
412413 type ExecResult = bool ;
413414
414- fn set_params ( & mut self , _params : Self :: Params ) { }
415-
416415 async fn prep ( & self , _store : & Self :: Storage ) -> Result < Self :: PrepResult , CanoError > {
417416 Err ( CanoError :: preparation ( & self . error_message ) )
418417 }
@@ -454,8 +453,6 @@ mod tests {
454453 type PrepResult = Option < String > ;
455454 type ExecResult = String ;
456455
457- fn set_params ( & mut self , _params : Self :: Params ) { }
458-
459456 async fn prep ( & self , store : & Self :: Storage ) -> Result < Self :: PrepResult , CanoError > {
460457 match store. get :: < String > ( & self . read_key ) {
461458 Ok ( value) => Ok ( Some ( value) ) ,
@@ -544,8 +541,6 @@ mod tests {
544541 type PrepResult = ( ) ;
545542 type ExecResult = ( ) ;
546543
547- fn set_params ( & mut self , _params : Self :: Params ) { }
548-
549544 async fn prep ( & self , _store : & Self :: Storage ) -> Result < Self :: PrepResult , CanoError > {
550545 Ok ( ( ) )
551546 }
@@ -581,8 +576,6 @@ mod tests {
581576 type PrepResult = String ;
582577 type ExecResult = String ;
583578
584- fn set_params ( & mut self , _params : Self :: Params ) { }
585-
586579 async fn prep ( & self , _store : & Self :: Storage ) -> Result < Self :: PrepResult , CanoError > {
587580 Ok ( "prep_completed" . to_string ( ) )
588581 }
@@ -937,8 +930,6 @@ mod tests {
937930 type PrepResult = ( ) ;
938931 type ExecResult = ( ) ;
939932
940- fn set_params ( & mut self , _params : Self :: Params ) { }
941-
942933 fn config ( & self ) -> NodeConfig {
943934 NodeConfig :: new ( ) . with_retries ( self . max_retries , Duration :: from_millis ( 1 ) )
944935 }
@@ -996,8 +987,6 @@ mod tests {
996987 type PrepResult = ( ) ;
997988 type ExecResult = ( ) ;
998989
999- fn set_params ( & mut self , _params : Self :: Params ) { }
1000-
1001990 fn config ( & self ) -> NodeConfig {
1002991 NodeConfig :: minimal ( )
1003992 }
0 commit comments