-
Notifications
You must be signed in to change notification settings - Fork 16
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
base: master
Are you sure you want to change the base?
Conversation
nodecore-spv/src/main/java/org/veriblock/spv/net/PeerEventListener.kt
Outdated
Show resolved
Hide resolved
nodecore-spv/build.gradle.kts
Outdated
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") |
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.
use 2.15+
if (blockMessage.previousHash.size() == VBK_HASH_LENGTH_FULL) | ||
blockMessage.previousHash.substring(VBK_HASH_LENGTH).asVbkPreviousBlockHash() | ||
else | ||
blockMessage.previousHash.asVbkPreviousBlockHash(), |
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.
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.
No description provided.