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

reorg SPV #340

Draft
wants to merge 12 commits into
base: master
Choose a base branch
from
Draft

reorg SPV #340

wants to merge 12 commits into from

Conversation

memekas
Copy link
Contributor

@memekas memekas commented Nov 19, 2021

No description provided.

@memekas memekas changed the title init Blockstore in Blockchain + beautify SpvContext reorg SPV Nov 19, 2021
implementation("org.slf4j:slf4j-api:$slf4jVersion")
implementation("io.github.microutils:kotlin-logging:2.0.11")
implementation("org.apache.logging.log4j:log4j-api:2.14.1")
implementation("org.apache.logging.log4j:log4j-core:2.14.1")
Copy link
Collaborator

Choose a reason for hiding this comment

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

use 2.15+

if (blockMessage.previousHash.size() == VBK_HASH_LENGTH_FULL)
blockMessage.previousHash.substring(VBK_HASH_LENGTH).asVbkPreviousBlockHash()
else
blockMessage.previousHash.asVbkPreviousBlockHash(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suggest to add this size check into asVbkPreviousBlockHash.
So that if previousHash is 12 or 24, asVbkPreviousBlockHash will do this size check + substring and then create proper hash.

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.

2 participants