@@ -245,15 +245,11 @@ impl NodeBuilder {
245245 self
246246 }
247247
248- /// Configures the [`Node`] instance to source its wallet entropy from the given 64 seed bytes.
249- pub fn set_entropy_seed_bytes ( & mut self , seed_bytes : Vec < u8 > ) -> Result < & mut Self , BuildError > {
250- if seed_bytes. len ( ) != WALLET_KEYS_SEED_LEN {
251- return Err ( BuildError :: InvalidSeedBytes ) ;
252- }
253- let mut bytes = [ 0u8 ; WALLET_KEYS_SEED_LEN ] ;
254- bytes. copy_from_slice ( & seed_bytes) ;
255- self . entropy_source_config = Some ( EntropySourceConfig :: SeedBytes ( bytes) ) ;
256- Ok ( self )
248+ /// Configures the [`Node`] instance to source its wallet entropy from the given
249+ /// [`WALLET_KEYS_SEED_LEN`] seed bytes.
250+ pub fn set_entropy_seed_bytes ( & mut self , seed_bytes : [ u8 ; WALLET_KEYS_SEED_LEN ] ) -> & mut Self {
251+ self . entropy_source_config = Some ( EntropySourceConfig :: SeedBytes ( seed_bytes) ) ;
252+ self
257253 }
258254
259255 /// Configures the [`Node`] instance to source its wallet entropy from a [BIP 39] mnemonic.
@@ -637,11 +633,20 @@ impl ArcedNodeBuilder {
637633 self . inner . write ( ) . unwrap ( ) . set_entropy_seed_path ( seed_path) ;
638634 }
639635
640- /// Configures the [`Node`] instance to source its wallet entropy from the given 64 seed bytes.
636+ /// Configures the [`Node`] instance to source its wallet entropy from the given
637+ /// [`WALLET_KEYS_SEED_LEN`] seed bytes.
641638 ///
642- /// **Note:** Panics if the length of the given `seed_bytes` differs from 64.
639+ /// **Note:** Will return an error if the length of the given `seed_bytes` differs from
640+ /// [`WALLET_KEYS_SEED_LEN`].
643641 pub fn set_entropy_seed_bytes ( & self , seed_bytes : Vec < u8 > ) -> Result < ( ) , BuildError > {
644- self . inner . write ( ) . unwrap ( ) . set_entropy_seed_bytes ( seed_bytes) . map ( |_| ( ) )
642+ if seed_bytes. len ( ) != WALLET_KEYS_SEED_LEN {
643+ return Err ( BuildError :: InvalidSeedBytes ) ;
644+ }
645+ let mut bytes = [ 0u8 ; WALLET_KEYS_SEED_LEN ] ;
646+ bytes. copy_from_slice ( & seed_bytes) ;
647+
648+ self . inner . write ( ) . unwrap ( ) . set_entropy_seed_bytes ( bytes) ;
649+ Ok ( ( ) )
645650 }
646651
647652 /// Configures the [`Node`] instance to source its wallet entropy from a [BIP 39] mnemonic.
0 commit comments