mirror of
https://github.com/luxfi/consensus.git
synced 2026-09-24 00:26:58 +00:00
The ai package imported github.com/luxfi/accel which requires CGO and C headers not available in CI. This caused integration tests to fail with [build failed] because the dependency chain couldn't compile. Solution: - Split accel.go into accel_cgo.go (requires cgo && accel tags) and accel_stub.go (fallback without CGO) - Extract shared types to accel_types.go - Update tests to skip when acceleration is not available
26 lines
584 B
Go
26 lines
584 B
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package ai
|
|
|
|
// Vote represents a consensus vote for batch processing.
|
|
type Vote struct {
|
|
VoterID [32]byte
|
|
BlockID [32]byte
|
|
IsPreference bool
|
|
}
|
|
|
|
// ValidatorInfo contains validator information for quorum calculations.
|
|
type ValidatorInfo struct {
|
|
ValidatorID [32]byte
|
|
Weight uint64
|
|
}
|
|
|
|
// QuorumResult contains the result of a quorum check.
|
|
type QuorumResult struct {
|
|
HasQuorum bool
|
|
TotalWeight uint64
|
|
VotedWeight uint64
|
|
QuorumWeight uint64
|
|
}
|