File tree Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Expand file tree Collapse file tree 1 file changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ use stacks::net::connection::ConnectionOptions;
53
53
use stacks:: net:: { Neighbor , NeighborKey } ;
54
54
use stacks:: types:: chainstate:: BurnchainHeaderHash ;
55
55
use stacks:: types:: EpochList ;
56
+ use stacks:: util:: hash:: to_hex;
56
57
use stacks:: util_lib:: boot:: boot_code_id;
57
58
use stacks:: util_lib:: db:: Error as DBError ;
58
59
use stacks_common:: consts:: SIGNER_SLOTS_PER_USER ;
@@ -833,7 +834,12 @@ impl Config {
833
834
}
834
835
835
836
let miner = match config_file. miner {
836
- Some ( miner) => miner. into_config_default ( miner_default_config) ?,
837
+ Some ( mut miner) => {
838
+ if miner. mining_key . is_none ( ) && !node. seed . is_empty ( ) {
839
+ miner. mining_key = Some ( to_hex ( & node. seed ) ) ;
840
+ }
841
+ miner. into_config_default ( miner_default_config) ?
842
+ }
837
843
None => miner_default_config,
838
844
} ;
839
845
@@ -2546,6 +2552,13 @@ pub struct MinerConfigFile {
2546
2552
2547
2553
impl MinerConfigFile {
2548
2554
fn into_config_default ( self , miner_default_config : MinerConfig ) -> Result < MinerConfig , String > {
2555
+ match & self . mining_key {
2556
+ Some ( _) => { }
2557
+ None => {
2558
+ panic ! ( "mining key not set" ) ;
2559
+ }
2560
+ }
2561
+
2549
2562
let mining_key = self
2550
2563
. mining_key
2551
2564
. as_ref ( )
You can’t perform that action at this time.
0 commit comments