stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 672 forks source link

Miner should panic if `mining_key` is not set #5473

Open obycode opened 3 days ago

obycode commented 3 days ago

Since the mining_key is required now that Nakamoto is active, MinerConfigFile::into_config_default should panic if it is not set. Otherwise, someone trying to mine could spend Bitcoin but then fail to mine blocks.

obycode commented 3 days ago

Alternative to panicking, it could instead default to using the miner's seed as the mining key if it is not defined.