Skip to content

Commit

Permalink
fix some semantics to pass the coding style test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dev committed Apr 5, 2024
1 parent 47a134b commit 301181d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
6 changes: 4 additions & 2 deletions domain/consensus/utils/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions domain/consensus/utils/pow/pow.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,17 @@ func NewState(header externalapi.MutableBlockHeader, generatedag bool) *State {
}
}

// Return the current hashing algo used

Check failure on line 109 in domain/consensus/utils/pow/pow.go

View workflow job for this annotation

GitHub Actions / Tests, ubuntu-latest

comment on exported function GetHashingAlgoVersion should be of the form "GetHashingAlgoVersion ..."

Check failure on line 109 in domain/consensus/utils/pow/pow.go

View workflow job for this annotation

GitHub Actions / Tests, windows-latest

comment on exported function GetHashingAlgoVersion should be of the form "GetHashingAlgoVersion ..."

Check failure on line 109 in domain/consensus/utils/pow/pow.go

View workflow job for this annotation

GitHub Actions / Tests, macos-latest

comment on exported function GetHashingAlgoVersion should be of the form "GetHashingAlgoVersion ..."
func GetHashingAlgoVersion() string {
return hashingAlgoVersion
}

// Return the readiness state of the context

Check failure on line 114 in domain/consensus/utils/pow/pow.go

View workflow job for this annotation

GitHub Actions / Tests, ubuntu-latest

comment on exported method State.IsContextReady should be of the form "IsContextReady ..."

Check failure on line 114 in domain/consensus/utils/pow/pow.go

View workflow job for this annotation

GitHub Actions / Tests, windows-latest

comment on exported method State.IsContextReady should be of the form "IsContextReady ..."

Check failure on line 114 in domain/consensus/utils/pow/pow.go

View workflow job for this annotation

GitHub Actions / Tests, macos-latest

comment on exported method State.IsContextReady should be of the form "IsContextReady ..."
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
Expand Down

0 comments on commit 301181d

Please sign in to comment.