Unless debugging, show a more useful format for the askfors #1344

pull rebroad wants to merge 1 commits into bitcoin:master from rebroad:AskForTimeFormat changing 1 files +1 −1
  1. rebroad commented at 9:15 PM on May 17, 2012: contributor

    Will show a human readable time that the getdata will be triggered. Easier to follow. Might even be better to show this when debugging also...?

  2. sipa commented at 7:50 PM on June 12, 2012: member

    ACK.

  3. in src/net.h:None in de9be1dc7e outdated
     293 | @@ -294,7 +294,8 @@ class CNode
     294 |          // We're using mapAskFor as a priority queue,
     295 |          // the key is the earliest time the request can be sent
     296 |          int64& nRequestTime = mapAlreadyAskedFor[inv];
     297 | -        printf("askfor %s   %"PRI64d"\n", inv.ToString().c_str(), nRequestTime);
     298 | +        printf("askfor %s   %"PRI64d" (%s)\n", inv.ToString().c_str(), nRequestTime,
     299 | +          DateTimeStrFormat("%H:%M:%S", nRequestTime/1000000));
    


    Diapolo commented at 8:45 PM on June 12, 2012:

    If you indent, can you use 4 spaces :)?


    rebroad commented at 4:34 PM on June 14, 2012:

    4 spaces would be misleading as it would look like it was within the logic of the preceeding line.


    sipa commented at 4:37 PM on June 14, 2012:

    Either keep it on the same line, or use 4 or 8 spaces as indent.


    rebroad commented at 11:05 PM on June 14, 2012:

    ok, changed (although I'm fairly certain it was better before this change).

  4. luke-jr commented at 11:53 PM on June 18, 2012: member
    net.h: In member function ‘void CNode::AskFor(const CInv&)’:
    net.h:299:137: error: cannot pass objects of non-trivially-copyable type ‘struct std::string’ through ‘...’
    
  5. Include human readble format for nRequestTime. 812392d325
  6. rebroad commented at 8:46 PM on July 2, 2012: contributor

    @luke-jr whoops. fixed. thanks for helping.

  7. jgarzik referenced this in commit a823faecf1 on Aug 1, 2012
  8. jgarzik merged this on Aug 1, 2012
  9. jgarzik closed this on Aug 1, 2012

  10. rebroad commented at 2:46 PM on September 1, 2012: contributor

    thanks!

  11. rebroad deleted the branch on Aug 7, 2016
  12. suprnurd referenced this in commit f774daf47f on Dec 5, 2017
  13. lateminer referenced this in commit c992fc1523 on May 6, 2020
  14. lateminer referenced this in commit e4041b1631 on May 6, 2020
  15. 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-22 18:16 UTC

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