Small fix for best_claim_effective_amount_equals #135

Merged
kaykurokawa merged 1 commit from small_effectiveamount_fix into master 2018-05-14 23:48:51 +02:00
kaykurokawa commented 2018-05-07 05:04:43 +02:00 (Migrated from github.com)

Noticed that in test fixture best_claim_effective_amount_equals, we called getEffectiveAmountForClaim() but never used its result. This is likely why the error in this PR https://github.com/lbryio/lbrycrd/pull/123 was never caught.

There is not really any functional difference between the original code and this change.

Noting that a small minor difference is that the effective amount returned in getInfoForName claim value is calculated on demand and may not necessarily be the correct value. For example upon lbrycrdd restart, the effective amount returned by getInfoForName will be garbage because it hasn't been calculated yet. This has no impact on these unit tests because we do not test restarts.

Noticed that in test fixture best_claim_effective_amount_equals, we called getEffectiveAmountForClaim() but never used its result. This is likely why the error in this PR https://github.com/lbryio/lbrycrd/pull/123 was never caught. There is not really any functional difference between the original code and this change. Noting that a small minor difference is that the effective amount returned in getInfoForName claim value is calculated on demand and may not necessarily be the correct value. For example upon lbrycrdd restart, the effective amount returned by getInfoForName will be garbage because it hasn't been calculated yet. This has no impact on these unit tests because we do not test restarts.
shyba commented 2018-05-07 23:28:16 +02:00 (Migrated from github.com)

@kaykurokawa LGTM. Nice catch!

@kaykurokawa LGTM. Nice catch!
shyba (Migrated from github.com) approved these changes 2018-05-07 23:28:50 +02:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbrycrd#135
No description provided.