[Qt] Add upload and download info to the peerlist (debug menu) #11499

pull aria-golliver wants to merge 2 commits into bitcoin:master from aria-golliver:provide-send-recv-count-to-peerlist changing 6 files +39 −22
  1. aria-golliver commented at 11:22 PM on October 14, 2017: contributor

    Makes the peer list display how much you've uploaded/downloaded from each peer.

    Here's a screenshot outdated, current of how it looks. You can now sort to see who are the peers you've uploaded the most too.

    I also moved RPCConsole::FormatBytes to guiutil::formatBytes so I could use it in the peerlist

  2. jonasschnelli added the label GUI on Oct 14, 2017
  3. in src/qt/peertablemodel.h:59 in 978835fb5d outdated
      55 | @@ -56,7 +56,10 @@ class PeerTableModel : public QAbstractTableModel
      56 |          NetNodeId = 0,
      57 |          Address = 1,
      58 |          Subversion = 2,
      59 | -        Ping = 3
      60 | +        // everything after ping will be right aligned
    


    promag commented at 11:29 AM on October 15, 2017:

    IMO remove this comment.

  4. in src/qt/peertablemodel.cpp:187 in 978835fb5d outdated
     183 | +            return GUIUtil::formatBytes(rec->nodeStats.nRecvBytes);
     184 |          }
     185 |      } else if (role == Qt::TextAlignmentRole) {
     186 | -        if (index.column() == Ping)
     187 | +        // everything after ping will be right aligned
     188 | +        if (index.column() >= Ping)
    


    promag commented at 11:32 AM on October 15, 2017:

    Explicit is better?

    switch (index.column()) {
        case Ping:
        case Sent:
        case Received:
            return Qt::AlignRight | Qt::AlignVCenter;
        default:
            return QVariant();
    }
    

    (Remove comment above)


    aria-golliver commented at 9:26 PM on October 15, 2017:

    Agreed

  5. promag commented at 12:02 PM on October 15, 2017: member

    Tested (almost) ACK 978835f.

    Currently Received is the last column, and the following will make this column the biggest: https://github.com/bitcoin/bitcoin/blob/6ab0e4cf49549640b903bf5fce0e6035b8116397/src/qt/rpcconsole.cpp#L561 IMO the column Node/Service should be the biggest.

  6. aria-golliver commented at 9:33 PM on October 15, 2017: contributor

    Currently the ping column is largest, But I think User Agent might be a the best choice. Anecdotally, it also has the longest, with the most interesting information on its right hand side (where it would be hidden if the column was too small). Also some nodes like to put messages/easter eggs in their user agent, so if we made it the bigger-by-default column they'd be easier to discover.

    Either would be better than ping though

  7. move human-readable byte formatting to guiutil 8e4aa35ffb
  8. Add Sent and Received information to the debug menu peer list 6b1891e2c0
  9. aria-golliver commented at 4:00 AM on October 17, 2017: contributor

    new screenshot (also notice someone with a message in their user agent like I mentioned above)

  10. laanwj commented at 3:05 PM on October 18, 2017: member

    Concept ACK, this is useful info, though we should avoid adding too many columns here.

  11. aria-golliver commented at 12:24 AM on October 19, 2017: contributor

    @laanwj agreed. I looked through CNodeStats to decide what to add and only sent/received bytes seemed interesting to me.

    I could maybe imagine someone wanting "length of time connected to that peer" or "per-peer upload/download speeds", but I think the risk of the table getting too busy is pretty low, and we could always implement a way to select which columns you want a-la task manager or p2p clients like bittorrent do.

    (that's actually something I'm interested in doing, but it felt like too big a change for my first go at this)

  12. jonasschnelli commented at 7:15 PM on October 19, 2017: contributor

    Tested ACK 6b1891e2c04410ebaa1d6399aab56b6c7495d0ff Agree with not adding to much stuff as column (transferred bytes makes sense also because you can sort).

  13. promag commented at 12:50 AM on October 22, 2017: member

    utACK 6b1891e.

  14. paveljanik commented at 9:31 AM on October 22, 2017: contributor

    ACK 6b1891e

  15. jonasschnelli merged this on Oct 23, 2017
  16. jonasschnelli closed this on Oct 23, 2017

  17. jonasschnelli referenced this in commit 6157e8ce39 on Oct 23, 2017
  18. luke-jr referenced this in commit 5af4fbb761 on Nov 11, 2017
  19. aria-golliver deleted the branch on Feb 22, 2018
  20. schancel referenced this in commit c29c9a8522 on Apr 22, 2019
  21. jonspock referenced this in commit 79776a7621 on Jun 13, 2019
  22. PastaPastaPasta referenced this in commit cb82409423 on Dec 22, 2019
  23. PastaPastaPasta referenced this in commit 39e659e5cc on Jan 2, 2020
  24. PastaPastaPasta referenced this in commit 6fe85c6f0b on Jan 4, 2020
  25. PastaPastaPasta referenced this in commit b2224d8e93 on Jan 12, 2020
  26. PastaPastaPasta referenced this in commit ca631400f0 on Jan 12, 2020
  27. PastaPastaPasta referenced this in commit 2e37213580 on Jan 12, 2020
  28. PastaPastaPasta referenced this in commit 3392fba054 on Jan 12, 2020
  29. PastaPastaPasta referenced this in commit 3a15728afa on Jan 12, 2020
  30. PastaPastaPasta referenced this in commit f5fbfd1af6 on Jan 12, 2020
  31. PastaPastaPasta referenced this in commit 7303c710c5 on Jan 16, 2020
  32. PastaPastaPasta referenced this in commit 948863c5b3 on Jan 22, 2020
  33. PastaPastaPasta referenced this in commit 65102b21dd on Jan 29, 2020
  34. PastaPastaPasta referenced this in commit 1c92f781e0 on Jan 29, 2020
  35. ckti referenced this in commit 77d15866e3 on Mar 28, 2021
  36. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-04-21 18:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me