Skip to content

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.

3 participants