fix: update VM to implement block.ChainVM interface correctly

- Updated Initialize signature to match block.ChainVM interface
- Added chainCtx field to store chain context (interfaces.Runtime)
- Fixed DBManager usage with Current() method
- Added ParseBlock wrapper to return correct block.Block type
- Fixed AppSender type conversion for network initialization
- Updated constants.sh to use luxfi/node instead of luxd
- Store toEngine channel for consensus message passing

This fixes the compilation errors and aligns with the new consensus interfaces.
This commit is contained in:
2025-09-06 13:52:18 +00:00
parent 10ccc2af40
commit c74bd1e40e
2 changed files with 38 additions and 10 deletions
+2 -2
View File
@@ -36,8 +36,8 @@ fi
# Don't export them as they're used in the context of other calls
if [[ -z ${LUX_VERSION:-} ]]; then
# Get module details from go.mod
MODULE_DETAILS="$(go list -m "github.com/luxfi/luxd" 2>/dev/null)"
# Get module details from go.mod - try node first, then luxd
MODULE_DETAILS="$(go list -m "github.com/luxfi/node" 2>/dev/null || go list -m "github.com/luxfi/luxd" 2>/dev/null || echo "")"
LUX_VERSION="$(echo "${MODULE_DETAILS}" | awk '{print $2}')"