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

Small fix to rpc_tests #412

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MitchellCash
Copy link
Contributor

sizeof(const char*) == 4 or 8 (on "sane" processor architectures) :-), sizeof(const char[]) is what you want.

As written the first substring was "04" and the second was "88c2" (on 32 bits architectures)

And I have changed the +2 in +1 so that the comment is right.

@@ -62,7 +62,7 @@ BOOST_FIXTURE_TEST_CASE(rpc_addmultisig, TestNetFixture)
string short1(address1Hex, address1Hex+sizeof(address1Hex)-2); // last byte missing
Copy link
Contributor

Choose a reason for hiding this comment

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

Interesting that we remove 2 here but only add 1 below...

Main problem with these tests, they check if something is thrown but have no valid way to check what (this is an issue with a lot of the tests actually).

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah unless I'm mistaken that 1 comment is also wrong but otherwise this PR seems safe enough.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants