Page MenuHomePhabricator

Fix cashaddrenc_tests/check_size
ClosedPublic

Authored by schancel on Dec 6 2017, 04:20.

Details

Summary

Fix the construction logic for check_size test.

Test Plan

make check

Diff Detail

Repository
rABC Bitcoin ABC
Branch
fix_check_size
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1263
Build 1263: arc lint + arc unit

Event Timeline

Not clear to me why adding 1.5 bytes with no comment is desirable. I thought initially the 12 was due to the bitcoincash prefix somehow.

deadalnix requested changes to this revision.Dec 6 2017, 12:57

I don't think the logic is broken to begin with and I don't think adding floating point ops is beneficial. If anything it opens to rounding problems.

This revision now requires changes to proceed.Dec 6 2017, 12:57

If I had to spend 30 minutes trying to figure out why expectedSize was calculated the way it is, then the comment is valuable.

  • Remove floating point math
This revision is now accepted and ready to land.Dec 6 2017, 16:26
This revision was automatically updated to reflect the committed changes.