Skip to content
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

Hashed Time-Locked Contracts #1370

Merged
merged 56 commits into from
Dec 21, 2018
Merged

Hashed Time-Locked Contracts #1370

merged 56 commits into from
Dec 21, 2018

Conversation

jmjatlanta
Copy link
Contributor

@jmjatlanta jmjatlanta commented Oct 13, 2018

Changes to implement BSIP 44

Fixes issue #1468

@pmconrad pmconrad added hardfork 2d Developing Status indicating currently designing and developing a solution 3b Feature Classification indicating the addition of novel functionality to the design 5a Docs Needed Status specific to Documentation indicating the need for proper documentation to be added 6 API Impact flag identifying the application programing interface (API) 6 Protocol Impact flag identifying the blockchain logic, consensus, validation, etc. labels Oct 13, 2018
@oxarbitrage oxarbitrage self-requested a review October 19, 2018 13:15
@pmconrad
Copy link
Contributor

Missing a test case for htlc_extend

@pmconrad pmconrad mentioned this pull request Dec 19, 2018
@jmjatlanta
Copy link
Contributor Author

Missing a test case for htlc_extend

added to htlc_tests/htlc_fulfilled

if (fee_params.fee_per_kb == 0)
return fee_params.fee;
uint64_t product = 1024 * fee_params.fee_per_kb;
FC_ASSERT( product / 1024 == fee_params.fee_per_kb, "Fee calculation overflow");
Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, no -

uint64_t kb = ( preimage.size() + 1023 ) / 1024;
uint64_t product = kb * fee_params.fee_per_kb;
FC_ASSERT( kb == 0 || product / kb == fee_params.fee_per_kb, "Fee calculation overflow");

@pmconrad
Copy link
Contributor

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2d Developing Status indicating currently designing and developing a solution 3b Feature Classification indicating the addition of novel functionality to the design 5a Docs Needed Status specific to Documentation indicating the need for proper documentation to be added 6 API Impact flag identifying the application programing interface (API) 6 Protocol Impact flag identifying the blockchain logic, consensus, validation, etc. hardfork
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants