Skip to content
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

Add /p2p page #3391

Merged
merged 2 commits into from
Sep 3, 2019
Merged

Add /p2p page #3391

merged 2 commits into from
Sep 3, 2019

Conversation

prestonvanloon
Copy link
Member

Adds new /p2p page served on the monitoring port. Try accessing http://localhost:8080/p2p.

Example:

bootnode=enode://e410306cb51fecbb94cbfd7d95111e446c5f1f5fc9c9ddcdd587a1fbf3e5f1f2f636137b830bab2555ad0a66c0235cc9fed0bfb9f71cf9c6c9dd0e9dd2e0bec9@127.0.0.1:5544
self=/ip4/192.168.1.8/tcp/32302/p2p/16Uiu2HAkuvwPDqG7R9PmLm5L6cus2hRMiAC2dekGVqgfRv8mXaEA

1 peers
/ip4/192.168.1.8/tcp/12000/p2p/16Uiu2HAm3V9NRkErwwMkwPgS8oQrc9TFzmFooJRYctnZs8CxkkmL

@codecov
Copy link

codecov bot commented Sep 3, 2019

Codecov Report

Merging #3391 into master will increase coverage by 37.29%.
The diff coverage is 11.36%.

@@             Coverage Diff             @@
##           master    #3391       +/-   ##
===========================================
+ Coverage    2.68%   39.98%   +37.29%     
===========================================
  Files          24      184      +160     
  Lines         967    12563    +11596     
===========================================
+ Hits           26     5023     +4997     
- Misses        940     6618     +5678     
- Partials        1      922      +921

1 similar comment
@codecov
Copy link

codecov bot commented Sep 3, 2019

Codecov Report

Merging #3391 into master will increase coverage by 37.29%.
The diff coverage is 11.36%.

@@             Coverage Diff             @@
##           master    #3391       +/-   ##
===========================================
+ Coverage    2.68%   39.98%   +37.29%     
===========================================
  Files          24      184      +160     
  Lines         967    12563    +11596     
===========================================
+ Hits           26     5023     +4997     
- Misses        940     6618     +5678     
- Partials        1      922      +921

func (s *Service) InfoHandler(w http.ResponseWriter, _ *http.Request) {
buf := new(bytes.Buffer)
if _, err := fmt.Fprintf(buf, `bootnode=%s
self=%s
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it just my browser? or this looks messed up

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it looks off

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

using ` formats it exactly how you have it. If i add tabs/spacing here, then it would be tabbed/spaced in the rendering.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah k, sounds good in that case

@rauljordan rauljordan merged commit 90b2a88 into master Sep 3, 2019
@rauljordan rauljordan deleted the p2p-info branch September 3, 2019 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants