-
Notifications
You must be signed in to change notification settings - Fork 84
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #166 +/- ##
========================================
Coverage 10.68% 10.68%
========================================
Files 12 12
Lines 2172 2172
========================================
Hits 232 232
Misses 1924 1924
Partials 16 16
Continue to review full report at Codecov.
|
Jae, while you are looking at protobuf format (and I agree with these changes), can you check out #165 ? I think it would be nice to express all Responses like (DeliverTxResponse, error), with a litlte adjustment to protobuf, we can add a simple golang function to extract the values from a Response into a more golang-esce format, and make us all hate protobuf just a little bit less. |
@ethanfrey Yeah of course, I will look at it in the next 10 hours. |
@ethanfrey Done, I responded there! |
@jaekwon, here is a little counter. The problems with non-pointers are that:
func fooWithPointer(b *Bar) {
b.Time = time.Now()
}
// Security safe pattern, awesome
func fooWithoutPointer(b Bar) {
b.Time = time.Now()
}
func zip(b Bar) {
b.Time = time.Now()
// do more stuff with b
if b.Time.After(aLongTimeAgo) {
}
// Irrespective of if b was a pointer or not, we've mutated it
} is |
Avoiding pointers where it isn't necessary is generally better for security, as non-pointer/non-addressable values are immutable.
Also, some of our proto fields just shouldn't be nullable.
This PR addresses both issues.