When I launch
lightningd it generates
These two files seem to be different as confirmed by
diff ~/.lightning/bitcoin/hsm_secret ~/.lightning/testnet/hsm_secret
returning some output.
Having in mind that
hsm_secret may get corrupted and being concerned with the security of my funds I decided to generate
hsm_secret from BIP-39 words
and back up both the phrase and the file.
After compiling c-lightning from source and generating [the mnemonic with Python, I then followed the documentation and run:
~/lightning/tools/lightning-hsmtool generatehsm hsm_secret
hsm_secret in the current directory.
~/lightning/tools/lightning-hsmtool generatehsm hsm_secret testnet and finding out that it does not work I decided
to try using the same
hsm_secret file for both the testnet and the mainnet, i.e. I
network=testnet and replaced the auto-generated
~/.lightning/testnet with the one I generated from my mnemonic and than did the same with
~/.lightning/bitcoin/hsm_secret. I was surprized to see that all seems to work fine,
newaddr generates tb1 addresses when on testnet and bc1 addresses when on mainnet.
What are the pros and cons of using the seperate
hsm_secret files vs using only one file for both networks.?