Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ + (instancetype)blockchainIdentityECDSAKeysDerivationPathForChain:(DSChain *)cha
+ (instancetype)blockchainIdentityBLSKeysDerivationPathForChain:(DSChain *)chain {
UInt256 indexes[] = {uint256_from_long(FEATURE_PURPOSE), uint256_from_long(chain_coin_type(chain.chainType)), uint256_from_long(FEATURE_PURPOSE_IDENTITIES), uint256_from_long(FEATURE_PURPOSE_IDENTITIES_SUBFEATURE_AUTHENTICATION), uint256_from_long(1)};
BOOL hardenedIndexes[] = {YES, YES, YES, YES, YES};
DSAuthenticationKeysDerivationPath *blockchainIdentityBLSKeysDerivationPath = [DSAuthenticationKeysDerivationPath derivationPathWithIndexes:indexes hardened:hardenedIndexes length:5 type:DSDerivationPathType_MultipleUserAuthentication signingAlgorithm:/*[chain activeBLSType]*/KeyKind_BLS reference:DSDerivationPathReference_BlockchainIdentities onChain:chain];
DSAuthenticationKeysDerivationPath *blockchainIdentityBLSKeysDerivationPath = [DSAuthenticationKeysDerivationPath derivationPathWithIndexes:indexes hardened:hardenedIndexes length:5 type:DSDerivationPathType_MultipleUserAuthentication signingAlgorithm:KeyKind_BLS reference:DSDerivationPathReference_BlockchainIdentities onChain:chain];
blockchainIdentityBLSKeysDerivationPath.shouldStoreExtendedPrivateKey = YES;
blockchainIdentityBLSKeysDerivationPath.usesHardenedKeys = YES;
return blockchainIdentityBLSKeysDerivationPath;
Expand Down
4 changes: 3 additions & 1 deletion DashSync/shared/Models/Masternode/DSLocalMasternode.m
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,9 @@ - (void)registrationTransactionFundedByAccount:(DSAccount *)fundingAccount toAdd
} else {
platformNodeKey = [platformNodeKeysDerivationPath privateKeyAtIndex:self.platformNodeWalletIndex fromSeed:seed];
}
UInt160 platformNodeID = [DSKeyManager publicKeyData:platformNodeKey].hash160;

UInt256 platformNodeHash = [DSKeyManager publicKeyData:platformNodeKey].SHA256;
UInt160 platformNodeID = *(UInt160 *)&platformNodeHash;

OpaqueKey *ownerKey;
if (self.ownerWalletIndex == UINT32_MAX) {
Expand Down