Skip to content

Conversation

@HashEngineering
Copy link
Collaborator

Fix some create/restore username issues

@HashEngineering HashEngineering self-assigned this Mar 24, 2025
Comment on lines -178 to +176
lateinit var registrationFundingPrivateKey: ECKey
var registrationFundingPrivateKey: ECKey? = null
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This isn't used, but we can keep it for now. crashes resulted from lateinit

Comment on lines +447 to +455
val coreHeight = if (assetLockTransaction!!.confidence.confidenceType == TransactionConfidence.ConfidenceType.BUILDING) {
assetLockTransaction!!.confidence.appearedAtChainHeight
} else {
DashSystem.get(wallet!!.params).blockChain.bestChainHeight
// this is not supported, how can we get the height?
// val txInfo = platform.client.getTransaction(assetLockTransaction!!.txId.toString())
// txInfo?.height ?: -1
}.toLong()

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is moved out of the loop so that coreHeight is not updated every time a block is mined which would keep this function running forever.

Copy link
Member

@Syn-McJ Syn-McJ left a comment

Choose a reason for hiding this comment

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

Looks good

@HashEngineering HashEngineering merged commit 94f35b1 into main Mar 26, 2025
@HashEngineering HashEngineering deleted the fix/create-restore-username branch November 7, 2025 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants