Closed Anyitechs closed 1 month ago
Name | Link |
---|---|
Latest commit | ddaa0dc1a51021d5fe37effe301f944c49c58049 |
Latest deploy log | https://app.netlify.com/sites/coffee-docs/deploys/663e32a72b1e1600078188cd |
Thank you for the review. I'll work on the requested changes and update the PR.
Good code, some small minor changes
Thank you for the review. I've addressed all the requested changes and updated the PR.
Let me know if there's anything I'm missing.
This PR validates the argument passed into the
-n
flag, and ensures only supported CLN networks are created in the/Users/User/.coffee
directory, and closes #270 .Implementation
The current implementation consists of:
ClnNetwork
) withMainnet
,Testnet
,Signet
, andRegtest
as variantsClnNetwork
implementation (impl
) with afrom_str
function thatmatch
es on thenetwork
(&str
) argument and returns aClnNetwork
variant, andto_str
function thatmatch
es on theClnNetwork
variant and returns the networkString
.network
function validates the-n
argument.Current Behaviour
The validation works as expected, so passing in a random name as the network name will not create the directory but the command returns the same output as below regardless of the network name. Also, passing in a random network name and running
coffee -n remote list
for the first time ignores the invalid network name and creates a/Users/ifeanyichukwu/.coffee/bitcoin
directory for example, but running the command again doesn't create a../.coffee/bitcoin
directory again.How to test
coffee
directorymake install
coffee -n remote list