Files
zeekay 3c474ee7b9 feat: consolidate shared VM chain components from node
Add vm/chain package with shared block caching infrastructure:
- BlockWrapper: Smart caching layer for VM blocks
- State: Block cache management (verified, decided, unverified)
- Status: Block status enum (Unknown, Processing, Rejected, Accepted)

Add Factory interface for VM instantiation.

This consolidation allows evm, coreth, and node to import from
github.com/luxfi/vm/chain without creating circular dependencies.

The chain package replaces node/vms/components/chain/ and can now
be imported directly by EVM implementations.
2026-01-01 13:44:08 -08:00

31 lines
543 B
Go

// Copyright (C) 2019-2025, Lux Industries, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package chain
// Status represents the status of a block
type Status uint8
const (
Unknown Status = iota
Processing
Rejected
Accepted
)
// String returns the string representation of the status
func (s Status) String() string {
switch s {
case Unknown:
return "Unknown"
case Processing:
return "Processing"
case Rejected:
return "Rejected"
case Accepted:
return "Accepted"
default:
return "Unknown"
}
}