diff --git a/domain/consensus/utils/constants/constants.go b/domain/consensus/utils/constants/constants.go index d2eb4a66f7..30eae8226c 100644 --- a/domain/consensus/utils/constants/constants.go +++ b/domain/consensus/utils/constants/constants.go @@ -3,9 +3,11 @@ package constants import "math" const ( - // BlockVersion represents the current block version + // BlockVersionBeforeHF represents the block version before HF BlockVersionBeforeHF uint16 = 1 - BlockVersionAfterHF uint16 = 2 + + // BlockVersionAfterHF represents the block version after HF + BlockVersionAfterHF uint16 = 2 // MaxTransactionVersion is the current latest supported transaction version. MaxTransactionVersion uint16 = 0 diff --git a/domain/consensus/utils/pow/pow.go b/domain/consensus/utils/pow/pow.go index 37b9276382..94ab63a544 100644 --- a/domain/consensus/utils/pow/pow.go +++ b/domain/consensus/utils/pow/pow.go @@ -106,16 +106,17 @@ func NewState(header externalapi.MutableBlockHeader, generatedag bool) *State { } } +// Return the current hashing algo used func GetHashingAlgoVersion() string { return hashingAlgoVersion } +// Return the readiness state of the context func (state *State) IsContextReady() bool { if state != nil && &state.context != nil { return state.context.ready - } else { - return false } + return false } // CalculateProofOfWorkValue hashes the internal header and returns its big.Int value