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

eth/filters,ethclient,node: install newSideHeads subscription #293

Closed
wants to merge 4 commits into from

Conversation

meowsbits
Copy link
Member

The newSideHeads subscription work very similarly to
the newHeads subscription; instead, non-canonical blocks are channeled.

Resolves #287

@@ -399,6 +440,10 @@ func (es *EventSystem) lightFilterNewHead(newHeader *types.Header, callBack func
}
}

func (es *EventSystem) lightFilterNewSideHead(header *types.Header, callBack func(*types.Header, bool)) {
callBack(header, true)
Copy link
Member Author

Choose a reason for hiding this comment

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

This is noteworthy; logs from side chain blocks will always be marked Removed: true. newHeads handling of this uses Removed to indicate the same characteristic, but in that context is expected to have been canonical, and is now removed to the side. Although the reuse of this field (and vocabulary) is a little awkward, I think it's the best we can do without modifying the existing API data type.

@meowsbits meowsbits force-pushed the feat/eth-subscribe-newsideblocks-pr branch from 717cc45 to 0848955 Compare January 12, 2021 13:33
The newSideHeads subscription work very similarly to
the newHeads subscription; instead, non-canonical blocks are channeled.
@meowsbits meowsbits force-pushed the feat/eth-subscribe-newsideblocks-pr branch from 0848955 to 6ae8387 Compare January 12, 2021 13:36
Date: 2021-01-12 08:05:16-06:00
Signed-off-by: meows <[email protected]>
eth/filters/api.go Outdated Show resolved Hide resolved
@meowsbits meowsbits force-pushed the feat/eth-subscribe-newsideblocks-pr branch from 0120632 to c8cf61d Compare January 12, 2021 15:56
Copy link
Member

@ziogaschr ziogaschr left a comment

Choose a reason for hiding this comment

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

LGTM!

…over test

Date: 2021-01-19 07:07:02-06:00
Signed-off-by: meows <[email protected]>
meowsbits added a commit that referenced this pull request Jan 19, 2021
#293

commit 85e4d0b
Author: meows <[email protected]>
Date:   Tue Jan 19 07:07:02 2021 -0600

    ethclient: install missing eth_newSideBlockFilter method for rpc.discover test

    Date: 2021-01-19 07:07:02-06:00
    Signed-off-by: meows <[email protected]>

commit c8cf61d
Author: meows <[email protected]>
Date:   Tue Jan 12 09:54:37 2021 -0600

    filters: (lint) fix comment

    Resolves https://github.com/etclabscore/core-geth/pull/293/files/bf5bd1290fdb0ad59e8d4255100934d053be6e5d#r555805816

    Date: 2021-01-12 09:54:37-06:00
    Signed-off-by: meows <[email protected]>

commit bf5bd12
Author: meows <[email protected]>
Date:   Tue Jan 12 08:05:16 2021 -0600

    filters: (lint) goimports

    Date: 2021-01-12 08:05:16-06:00
    Signed-off-by: meows <[email protected]>

commit 6ae8387
Author: meows <[email protected]>
Date:   Mon Jan 11 18:13:48 2021 -0600

    eth/filters,ethclient,node: install newSideHeads subscription

    The newSideHeads subscription work very similarly to
    the newHeads subscription; instead, non-canonical blocks are channeled.
@meowsbits
Copy link
Member Author

Merged with 9422e73 on the CLI:

> git merge --squash --commit --e --signoff -S feat/eth-subscribe-newsideblocks-pr

@meowsbits meowsbits closed this Jan 19, 2021
This was referenced Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rpc: add newSideBlocks subscription
2 participants