-
Notifications
You must be signed in to change notification settings - Fork 7
Dgld 2 #3
base: master
Are you sure you want to change the base?
Dgld 2 #3
Conversation
Makefiles fixed. Unit tests passing.
Package version updates.
val expected = AnyAddress("__EXPECTED_RESULT_ADDRESS__", CoinType.DIGITALGOLD) | ||
|
||
assertEquals(pubkey.data().toHex(), "0x__EXPECTED_PUBKEY_DATA__") | ||
assertEquals(address.description(), expected.description()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are you planning to add test cases here? Seems like you already have one working on C++ core level
//assertEquals( | ||
// "__EXPECTED_RESULT_DATA__", | ||
// Numeric.toHexString(output.encoded.toByteArray()) | ||
//) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And here
let addressFromString = AnyAddress(string: "__ADDRESS_DATA__", coin: .digitalgold)! | ||
|
||
XCTAssertEqual(pubkey.data.hexString, "__EXPECTED_PUBKEY_DATA__") | ||
XCTAssertEqual(address.description, addressFromString.description) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And on Swift level too
memset(ed25519_public_key_val, 0, 32); | ||
curve25519_pk_to_ed25519(ed25519_public_key_val, node->public_key + 1); | ||
ed25519_sign(msg, msg_len, node->private_key, ed25519_public_key_val, sig); | ||
const uint8_t sign_bit = ed25519_public_key_val[31] & 0x80; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like a leftover from debugging? (Because it's just variable rename)
We don't want to change the core very much, unless it's really necessary
@@ -118,7 +119,7 @@ Data Base58::decode(const char* begin, const char* end) const { | |||
} | |||
|
|||
// Skip trailing spaces. | |||
it = std::find_if_not(it, end, std::isspace); | |||
it = std::find_if_not(it, end, [](unsigned char ch) -> bool { return std::isspace(ch); }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a new requirement enforced by altered build flags?
I still see the old lines in upstream master
- https://github.com/trustwallet/wallet-core/blob/master/src/Base58.cpp#L80
Description
DGLD implementation.
Testing instructions
Tests will be executed during build.
Types of changes
Rebased to new master.
Test cases, notably signing.
Some build system fixes.