-
Notifications
You must be signed in to change notification settings - Fork 33
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
add test contract and contract backfill to get logs #137
Conversation
Codecov Report
@@ Coverage Diff @@
## master #137 +/- ##
===================================================
+ Coverage 51.45197% 52.81948% +1.36750%
===================================================
Files 132 134 +2
Lines 5372 5462 +90
Branches 73 73
===================================================
+ Hits 2764 2885 +121
+ Misses 2337 2298 -39
- Partials 271 279 +8
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
|
||
// TestGetLogsMock tests the GetLogs function using a mocked blockchain for errors. | ||
func (b BackfillSuite) TestGetLogsMock() { | ||
// TODO: do this with mocks |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's make this comment a little clearer - "for error handling in GetLogs methods"
scribe/backfill/suite_test.go
Outdated
return fmt.Sprintf("%s:%s@tcp(%s:%d)/%s?parseTime=true", common.GetEnv("MYSQL_USER", "root"), os.Getenv("MYSQL_PASSWORD"), common.GetEnv("MYSQL_HOST", "127.0.0.1"), common.GetEnvInt("MYSQL_PORT", 3306), dbname) | ||
} | ||
|
||
func (b *BackfillSuite) setupMysqlDB() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no need to test against multiple dbs here
Description
For the scribe (#114), there is a need for backlogging logs from transactions that occurred. This is going to eventually pair with a live watcher that will add logs and receipts to the database in real time. Right now, this PR merely gets logs from a certain blockheight to another blockheight.