wormhole/bridge/pkg/processor/quorum.go

10 lines
407 B
Go
Raw Normal View History

package processor
// CalculateQuorum returns the minimum number of have that needs to sign a VAA for a given guardian set.
//
// The canonical source is the calculation in the contracts (solana/bridge/src/processor.rs and
// ethereum/contracts/Wormhole.sol), and this needs to match the implementation in the contracts.
func CalculateQuorum(numGuardians int) int {
return ((numGuardians*10/3)*2)/10 + 1
}