Skip to content

(VDB-1605) cat 1.1.0 storage#283

Merged
rmulhol merged 1 commit intobetafrom
vdb-1605-cat-1.1.0-storage
Sep 8, 2020
Merged

(VDB-1605) cat 1.1.0 storage#283
rmulhol merged 1 commit intobetafrom
vdb-1605-cat-1.1.0-storage

Conversation

@rmulhol
Copy link
Copy Markdown
Contributor

@rmulhol rmulhol commented Sep 1, 2020

No description provided.


var actualIlks []ilkHelpers.IlkSnapshot
err := db.Select(&actualIlks, `SELECT ilk_identifier, rate, art, spot, line, dust, chop, lump, flip, rho, duty, pip, mat, created, updated FROM api.all_ilks()`)
err := db.Select(&actualIlks, `SELECT ilk_identifier, rate, art, spot, line, dust, chop, lump, flip, rho, duty, pip, mat, dunk, created, updated FROM api.all_ilks()`)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Making sure I understand how we're handling this - we're expecting that we'd see lump be 0 for the new contract, and dunk be 0 for the old contract. Is that right?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I think we'd expect those values to be null on the contract where they aren't present, although it looks a little different on the actual ilk_snapshot table depending on the history of the ilk - e.g. if a lump was assigned before a dunk, then lump = n and dunk = null. Once dunk is assigned, lump = n and dunk = m. If lump was never assigned before dunk (for a new ilk), then lump = null and dunk = n, etc

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

also, if we insert a fake diff to wipe the lump, then we'd expect lump to go to whatever it's assigned to in the fake diff

BeforeEach(func() {
test_config.CleanTestDB(db)
repo = cat.StorageRepository{ContractAddress: test_data.CatAddress()}
repo = cat.StorageRepository{ContractAddress: test_data.CatV100Address()}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Super small thing, but I wonder if we should use CatV110Address for these new storage slot tests, since they are only in the new contract? Not that it probably matters for these specific tests, but it may be helpful for documentation purposes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

As it stands, this repository includes fields from both contracts (e.g. both lump and dunk). Happy to make the change, but I guess neither contract has all of the values that are included in these tests 🤔

@rmulhol rmulhol force-pushed the vdb-1605-cat-1.1.0-storage branch 3 times, most recently from 81d0d62 to 42ab9e7 Compare September 8, 2020 16:01
@rmulhol rmulhol force-pushed the vdb-1605-cat-1.1.0-storage branch from 42ab9e7 to 3831852 Compare September 8, 2020 20:45
@rmulhol rmulhol merged commit d6e7219 into beta Sep 8, 2020
@rmulhol rmulhol deleted the vdb-1605-cat-1.1.0-storage branch September 8, 2020 21:02
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