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

multi: source index notifs. from block notifs. #2256

Merged
merged 1 commit into from Oct 20, 2021

Conversation

dnldd
Copy link
Member

@dnldd dnldd commented Jul 10, 2020

Depends on #2219

This updates the index subscriber to use block notifications as the source of index notifications.

@davecgh davecgh added this to the 1.7.0 milestone Jul 14, 2020
Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

I'll need to wait until the prequisite PR is finalized and this is rebased and upgraded accordingly before final approval, but I did want to comment that the overall approach seems fine here.

@davecgh
Copy link
Member

davecgh commented Oct 12, 2021

This will need a rebase after #2219 is merged and is also failing the build.

@dnldd dnldd force-pushed the index_sub_blockchain_notif branch 3 times, most recently from 2f0cd39 to 489f467 Compare October 13, 2021 00:12
blockchain/chain.go Outdated Show resolved Hide resolved
Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

I'll need to test this before approving, but the updated version looks good. I don't see any issues code wise and it is much cleaner and more efficient this way.

Copy link
Member

@matheusd matheusd left a comment

Choose a reason for hiding this comment

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

Working as intended

Copy link
Member

@rstaudt2 rstaudt2 left a comment

Choose a reason for hiding this comment

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

This looks good to me other than I noticed that IsTreasuryEnabled is not being set correctly on indexers.IndexNtfn. I noticed this is also the case here in this code that is already merged:

ntfn := &IndexNtfn{
NtfnType: DisconnectNtfn,
Block: block,
Parent: parent,
PrevScripts: prevScripts,
Done: make(chan bool),
}

server.go Outdated Show resolved Hide resolved
server.go Outdated Show resolved Hide resolved
@davecgh
Copy link
Member

davecgh commented Oct 18, 2021

I'll be testing this with the latest updates tonight.

Copy link
Member

@davecgh davecgh left a comment

Choose a reason for hiding this comment

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

Looks good. I tested this by dropping all of the indexes and allowing them to be reindexed from scratch and then performing the various RPCs that make use of said indexes.

Copy link
Member

@rstaudt2 rstaudt2 left a comment

Choose a reason for hiding this comment

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

Looks good. Are you planning on also updating this location in a separate PR? Just want to make sure we don't forget about that.

@dnldd
Copy link
Member Author

dnldd commented Oct 19, 2021

Whoops, good catch @rstaudt2. Missed that, resolving.

This updates the index subscriber to use block notifications as the
source of index notifications.
@davecgh davecgh merged commit cdf881d into decred:master Oct 20, 2021
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.

None yet

4 participants