Skip to content

Conversation

luke-jr
Copy link
Member

@luke-jr luke-jr commented Feb 24, 2017

Simple realtime log of p2p network activity (blocks and transactions only)

  • Doesn't begin logging until opened; limited to 0x400 entries (outputs)
  • Automatically scrolls if left at the bottom of the log; maintains position if left elsewhere
  • Memory-efficient circular buffer; CTransaction references become weak after they're 0x200 entries back in the log
  • Search function that selects all matching log entries, including ongoing

@paveljanik
Copy link
Contributor

This is how it looks like here on testnet:

screen shot 2017-02-24 at 08 22 39

@jonasschnelli
Copy link
Contributor

jonasschnelli commented Feb 24, 2017

Thanks. Will review.
I just played a bit with it and had massive locking issues on mainnet during catch-up of 2-3 weeks.

@luke-jr luke-jr force-pushed the gui_netwatch branch 2 times, most recently from bc3e9fd to 9019229 Compare February 24, 2017 20:29
@jonasschnelli
Copy link
Contributor

Running this PR (built over gitian: https://bitcoin.jonasschnelli.ch/build/54) makes Bitcoin-Qt and also the rest of my apps almost unusable. Had to force kill the process.

@luke-jr luke-jr force-pushed the gui_netwatch branch 2 times, most recently from aee0ac0 to bbbef18 Compare August 25, 2017 07:30
@laanwj
Copy link
Member

laanwj commented Mar 6, 2018

Concept ACK, I like having this, though we have to be sure that there is no performance impact when the monitor is not running, and as little as possible when it is.

@luke-jr
Copy link
Member Author

luke-jr commented Mar 7, 2018

The code is (already) disabled until the first time it is opened.

@luke-jr
Copy link
Member Author

luke-jr commented Oct 30, 2018

Oops, had rebased onto 0.17 instead of master. Rebased for real this time.

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

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

Concept ACK.

Code style is a bit outdated.

*((meta_t*)data) |= (3 << 30);
}

class NetWatchValidationInterface final : public CValidationInterface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should use/extend interfaces::Node instead?

@DrahtBot
Copy link
Contributor

DrahtBot commented Oct 31, 2018

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #16612 (qt: Remove menu icons by laanwj)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

NetWatchLogModel& model;

public:
NetWatchValidationInterface(NetWatchLogModel& model_in) : model(model_in) {}
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be explicit? :-)

NWLMH_VALUE,
};

NetWatchLogModel(QWidget *parent);
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be made explicit?

--m_logskip;
} else {
// Haven't filled up yet, so just push_back
assert(!m_logpos);
Copy link
Contributor

@ken2812221 ken2812221 Nov 3, 2018

Choose a reason for hiding this comment

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

I see this assertion on Windows in testing, haven't take a look at the code.

image

Copy link
Member Author

Choose a reason for hiding this comment

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

Any idea how?>

Simple realtime log of p2p network activity (blocks and transactions only)

- Doesn't begin logging until opened; limited to 0x400 entries (outputs)
- Automatically scrolls if left at the bottom of the log; maintains position if left elsewhere
- Memory-efficient circular buffer; CTransaction references become weak after they're 0x200 entries back in the log
- Search function that selects all matching log entries, including ongoing
ptx_old->~CTransactionRef();
CTransactionWeakref * const ptx_new = get<CTransactionWeakref>();
new (ptx_new) CTransactionWeakref(tx);
*((meta_t*)m_data) |= (3 << 30);
Copy link
Contributor

Choose a reason for hiding this comment

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

Shift overflow?

@DrahtBot
Copy link
Contributor

Needs rebase

@laanwj
Copy link
Member

laanwj commented Sep 30, 2019

As this PR has been inactive for a long time, I'm closing this (but marking "up for grabs").

@maflcko
Copy link
Member

maflcko commented Oct 5, 2021

Moved to bitcoin-core/gui#444

@bitcoin bitcoin locked and limited conversation to collaborators Oct 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants