-
Notifications
You must be signed in to change notification settings - Fork 650
Add network mapper from bitshares-1 #1372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
indentation is different: somewhere 2 spaces, somewhere 3 spaces, and somewhere 4 spaces (network_mapper.cpp).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
fc::ip::address(), 0, 0, | ||
my_node_id.get_public_key(), | ||
signature, | ||
chain_id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line is looking ugly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see comment
std::string hostname = endpoint_string.substr(0, colon_pos); | ||
return fc::resolve(hostname, port); | ||
} | ||
|
||
int main(int argc, char** argv) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not to use boost::program_options
like in cli_wallet
for example ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in addition IMHO we should have some default values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
after compiling this code, I cannot start witness_node
, I see next error:
./programs/witness_node/witness_node
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::bad_any_cast> >'
what(): boost::bad_any_cast: failed conversion using boost::any_cast
Aborted (core dumped)
Please merge latest develop when testing. I believe it's fixed by #1374. |
@abitmore Thanks ! ok sure will bump now, I believe too that it will help, just thought about this too ... |
rebase helped ! |
Thanks. If whoever tackles #1348 decides that this tool might be handy, we can invest time to reformat and think about |
I wanted to giuve a try to this tool however i am getting the following error with any seed i tried:
I am not running it properly ? |
Hm, seems to be some kind of initialization problem. If you specify two seed nodes (or one with several addresses) it'll work. |
Fixed stupid error. Hint: don't use promise.wait(timeout). |
I have a hard time understanding the usefulness of this program. Here is a sample log: https://raw.githubusercontent.com/oxarbitrage/logs/master/network-mapper.txt Can someone direct me to a practical example on what someone can do with this output ? Another thing, if we merge we need to update the programs README if we add this new program: https://github.com/bitshares/bitshares-core/blob/develop/programs/README.md |
It generates .DOT file that can be rendered by graphviz to make images of node connectivity. The DOT file is created here: |
Thank you @dnotestein , makes sense now. However it seems to not be working, the dot file is not generated:
maybe because of segfault?
|
Replaced with #1555, see comment there. |
Fix for #1550
Ported from https://github.com/bitshares/bitshares1-core/blob/master/programs/utils/map_bts_network.cpp