bitcoin-dev-project / bitcoin-dev-project/sim-ln

docker setup-volume script flexibilty

Open
#136 1 comment 0 reactions 0 assignees View on GitHub
bug help wanted High Priority
Dominant language
Rust
Stars
80
Forks
40
Avg merge
18h 49m
Merged PRs (30d)
2

Description

Running macOS with the GNU version of `sed` installed, replacing the BSD version of `sed` (because all the bitcoin core devs run linux I suppose?) I encountered this issue where I think the empty string parameter is unnecessary:

```
--> make mount-volume SIMFILE_PATH=/Users/matthewzipkin/.warnet/warnet/warnet/simln/sim.json
chmod +x ./docker/setup-volume.sh && ./docker/setup-volume.sh "/Users/matthewzipkin/.warnet/warnet/warnet/simln/sim.json"
sed: can't read s|/Users/matthewzipkin/.warnet/warnet/warnet/simln/tls.cert|/data/lnd/warnet_ln_000000/tls.cert|: No such file or directory
sed: can't read s|/Users/matthewzipkin/.warnet/warnet/warnet/simln/admin.macaroon|/data/lnd/warnet_ln_000000/admin.macaroon|: No such file or directory
sed: can't read s|/Users/matthewzipkin/.warnet/warnet/warnet/simln/tls.cert|/data/lnd/warnet_ln_000001/tls.cert|: No such file or directory
sed: can't read s|/Users/matthewzipkin/.warnet/warnet/warnet/simln/admin.macaroon|/data/lnd/warnet_ln_000001/admin.macaroon|: No such file or directory
sed: can't read s|/Users/matthewzipkin/.warnet/warnet/warnet/simln/tls.cert|/data/lnd/warnet_ln_000002/tls.cert|: No such file or directory
sed: can't read s|/Users/matthewzipkin/.warnet/warnet/warnet/simln/admin.macaroon|/data/lnd/warnet_ln_000002/admin.macaroon|: No such file or directory
simln-data
```

In addition, the `sed` command won't work for my particular use-case (exporting from warnet) because my cert and macaroon files are not named exactly how you expect:

```sh
sed -i '' 's|'$(dirname $NODE_TLS_PATH_ON_HOST)'/tls.cert|/data/lnd/'$NODE_ID'/tls.cert|' $STAGING_DIR/sim.json
```

but my sim.json file...

```json
{
"nodes":
[
{
"LND":
{
"id": "warnet_ln_000000",
"address": "https://100.13.229.42:10009",
"macaroon": "/Users/matthewzipkin/.warnet/warnet/warnet/simln/warnet_ln_000000_admin.macaroon",
"cert": "/Users/matthewzipkin/.warnet/warnet/warnet/simln/warnet_ln_000000_tls.cert"
}
},
...
etc
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.