quorum.go 411 B

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