Skip to content

(VDB-1315) Add GetHeaderByID for event-based backfill#96

Merged
rmulhol merged 2 commits intostagingfrom
backfill-helpers
May 26, 2020
Merged

(VDB-1315) Add GetHeaderByID for event-based backfill#96
rmulhol merged 2 commits intostagingfrom
backfill-helpers

Conversation

@rmulhol
Copy link
Copy Markdown

@rmulhol rmulhol commented May 22, 2020

No description provided.

@rmulhol rmulhol changed the title Backfill helpers (VDB-1315) Add GetHeaderByID for event-based backfill May 22, 2020
@rmulhol rmulhol force-pushed the backfill-helpers branch from a2e0d09 to b3c722d Compare May 22, 2020 18:44
Copy link
Copy Markdown

@elizabethengelman elizabethengelman left a comment

Choose a reason for hiding this comment

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

LGTM! :shipit:

})
})

Describe("creating a receipt", func() {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this being removed because we have tests in pkg/datastore/postgres/repositories/receipt_repository_test.go?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

yep 👍

test_config.CleanTestDB(db)
receiptRepo = repositories.ReceiptRepository{}
headerRepo = repositories.NewHeaderRepository(db)
header = core.Header{
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💯

"github.com/makerdao/vulcanizedb/pkg/contract_watcher/helpers/test_helpers/mocks"
"github.com/makerdao/vulcanizedb/pkg/contract_watcher/repository"
"github.com/makerdao/vulcanizedb/pkg/core"
"github.com/makerdao/vulcanizedb/pkg/datastore"
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How come we're importing the HeaderRepository as datastore now instead of repositories? It looks like it's still in the repositories package.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

datastore is the interface, repositories is the (now private) implementation

Rob Mulholand added 2 commits May 26, 2020 16:20
- rename previous GetHeader to GetHeaderByBlockNumber
- Access via interface not implementation
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.

2 participants