diff --git a/consensus/block.go b/consensus/block.go index 2f20298..a1787c9 100644 --- a/consensus/block.go +++ b/consensus/block.go @@ -190,6 +190,12 @@ func checkBlockVersion(majorVersion uint8, forks []config.HardFork, height uint6 return nil } +// CheckBlockVersion validates that the block's major version matches the +// expected version for the supplied height and fork schedule. +func CheckBlockVersion(majorVersion uint8, forks []config.HardFork, height uint64) error { + return checkBlockVersion(majorVersion, forks, height) +} + // ValidateBlock performs full consensus validation on a block. It checks // the block version, timestamp, miner transaction structure, and reward. // Transaction semantic validation for regular transactions should be done