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

Fix line length, add preimage to HTLC virtual operation #2161

Merged
merged 2 commits into from
Apr 28, 2020

Conversation

jmjatlanta
Copy link
Contributor

@jmjatlanta jmjatlanta commented Apr 28, 2020

Problem 1: htlc_redeem_operation virtual operation was not storing the preimage. Fixed in htlc.hpp::htlc_redeemed_operation constructor, and tested in cli_test/main.cpp

      struct htlc_redeemed_operation : public base_operation
      {
         htlc_id_type htlc_id;
         account_id_type from, to, redeemer;
         asset amount;
         htlc_hash htlc_preimage_hash;
         uint16_t htlc_preimage_size;
         asset fee;
         std::vector<char> preimage;
      };

Problem 2: Some of the lines modified as part of BSIP 64 are too long, and should be wrapped.

Problem 3: Only 50 characters were displayed as part of operation history. It is believed that number is too small. Increased to 300. See operation_printer.cpp::print_preimage

Fixes #2160

abitmore
abitmore previously approved these changes Apr 28, 2020
Copy link
Member

@abitmore abitmore left a comment

Choose a reason for hiding this comment

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

Thanks. Waiting for CI results.

@abitmore
Copy link
Member

Travis CI failed to build cli_test:

/home/travis/build/bitshares/bitshares-core/tests/cli/main.cpp:1762:99: error: ‘BOOST_TEST’ was not declared in this scope
BOOST_TEST( hist[0].description.find("with preimage "4d792") != hist[0].description.npos);

@abitmore abitmore dismissed their stale review April 28, 2020 16:46

CI failed

@jmjatlanta
Copy link
Contributor Author

Travis CI failed to build cli_test:

/home/travis/build/bitshares/bitshares-core/tests/cli/main.cpp:1762:99: error: ‘BOOST_TEST’ was not declared in this scope
BOOST_TEST( hist[0].description.find("with preimage "4d792") != hist[0].description.npos);

BOOST version difference. I'll get it fixed.

Copy link
Member

@abitmore abitmore left a comment

Choose a reason for hiding this comment

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

Thanks.

Protocol Upgrade Release (4.0.0) automation moved this from In development to In testing Apr 28, 2020
@abitmore abitmore merged commit ca06127 into hardfork Apr 28, 2020
Protocol Upgrade Release (4.0.0) automation moved this from In testing to Done Apr 28, 2020
@abitmore abitmore deleted the jmj_bsip_64_pt2 branch April 28, 2020 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants