From bc3e2086911cf2909479bf0732b2f381583319e7 Mon Sep 17 00:00:00 2001 From: Virgil Date: Sat, 4 Apr 2026 21:50:42 +0000 Subject: [PATCH] fix(consensus): restore exported block version check Co-Authored-By: Charon --- consensus/block.go | 6 ++++++ 1 file changed, 6 insertions(+) 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