bitcoin-dev-project / warnet

Monitor and analyze the emergent behaviors of Bitcoin networks
https://warnet.dev
MIT License
59 stars 27 forks source link

tank: fix default version string #305

Closed willcl-ark closed 2 months ago

willcl-ark commented 2 months ago

Fixes: #271

pinheadmz commented 2 months ago

LGTM. did not test locally but reviewed CI output which is basically fine. The columns in the tables aren't wide enough but thats not a blocker for me:

┏━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┓
┃ Index ┃ Version        ┃ IPv4           ┃ bitcoin conf ┃ tc_netem ┃ LN Image ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━┩
│ 0     │ 26.0           │ 100.240.22.50  │              │ None     │          │
│ 1     │ bitcoindevpro… │ 100.172.83.42  │              │ None     │          │
│ 2     │ 26.0           │ 100.208.119.43 │              │ None     │          │
│ 3     │ 26.0           │ 100.198.166.2… │              │ None     │          │
│ 4     │ 26.0           │ 100.172.200.35 │              │ None     │          │
│ 5     │ 26.0           │ 100.197.86.53  │              │ None     │          │
│ 6     │ 26.0           │ 100.4.193.118  │              │ None     │          │
│ 7     │ 26.0           │ 100.183.35.148 │              │ None     │          │
│ 8     │ 26.0           │ 100.214.168.2… │              │ None     │          │
│ 9     │ 26.0           │ 100.131.67.126 │              │ None     │          │
└───────┴────────────────┴────────────────┴──────────────┴──────────┴──────────┘
┏━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━┓
┃ Index ┃ Version       ┃ IPv4           ┃ bitcoin conf  ┃ tc_netem ┃ LN Image ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━┩
│ 0     │ 26.0          │ 100.165.58.12  │ -uacomment=w0 │ None     │          │
│ 1     │ bitcoin/bitc… │ 100.147.219.54 │ -uacomment=v… │ None     │          │
└───────┴───────────────┴────────────────┴───────────────┴──────────┴──────────┘
willcl-ark commented 2 months ago

@pinheadmz what command are you running for that? It looks nice for me:

image

pinheadmz commented 2 months ago

yeah actually running with it locally looks fine too, that copy/paste is from the CI logs. so my guess is the fancy table output module we use measures the terminal width

willcl-ark commented 2 months ago

I was considering removing this function too, as it's unused (and confusing that it exists): https://github.com/bitcoin-dev-project/warnet/blob/5651c12ab0898f0c3744178c9df482a79473e141/src/warnet/warnet.py#L41-L65

It would only be used if someone did print(warnet) (or print(self) in a warnet). WDYT?

pinheadmz commented 2 months ago

I was considering removing this function too, as it's unused (and confusing that it exists):

If its curently unused, nuke it. might be other similar functions in tank.py or lnnode.py or others like __dict__() ?

willcl-ark commented 2 months ago

Nuked in e17b0841113d97d314b64a3757cf808ad2a706fa