mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
rip: AI-generated debug fmt.Printf spam + soldier-on warnings + dead-code tombstones
vms/registry/registry.go: drop 17 [Registry]/[VMGetter] debug fmt.Printf calls that were left from an AI debugging session. Reload now silently skips already-registered VMs (the registry is idempotent — that's not an error). Doc-commented for what each return value means. node/node.go: drop the [BOOTSTRAP] fmt.Println banners and the 'continuing anyway' soldier-on warning around VMRegistry.Reload. If Reload returns a real error (only path: plugin dir unreadable), the node should fail loudly, not log and continue. vms/xvm/vm_benchmark_test.go, vms/platformvm/validators/test_manager.go, wallet/chain/p/wallet/backend_visitor.go, wallet/keychain/keychain_test.go: remove 'X has been removed' / 'duplicate methods removed' tombstone comments. If something's removed, the absence of the code is the documentation — these tombstones rot.
This commit is contained in:
@@ -816,9 +816,6 @@ func (n *Node) Dispatch() error {
|
||||
}
|
||||
|
||||
// Add bootstrap nodes to the peer network
|
||||
fmt.Println("================================================================================")
|
||||
fmt.Printf("[BOOTSTRAP] Adding %d bootstrap nodes to peer network\n", len(n.Config.Bootstrappers))
|
||||
fmt.Println("================================================================================")
|
||||
n.Log.Info("Adding bootstrap nodes to peer network",
|
||||
"count", len(n.Config.Bootstrappers),
|
||||
)
|
||||
@@ -841,7 +838,6 @@ func (n *Node) Dispatch() error {
|
||||
}
|
||||
n.Net.ManuallyTrack(bootstrapper.ID, bootstrapper.Endpoint)
|
||||
}
|
||||
fmt.Println("[BOOTSTRAP] Finished adding bootstrap nodes, starting Dispatch")
|
||||
n.Log.Info("Finished adding bootstrap nodes, starting Dispatch")
|
||||
|
||||
// Start P2P connections
|
||||
|
||||
@@ -98,8 +98,6 @@ func (testManager) NumValidators(ids.ID) int {
|
||||
// RegisterSetCallbackListener implements validators.Manager interface
|
||||
func (testManager) RegisterSetCallbackListener(ids.ID, validators.SetCallbackListener) {}
|
||||
|
||||
// RegisterWeightCallbackListener removed - doesn't exist in consensus
|
||||
|
||||
// GetValidators implements validators.Manager interface
|
||||
func (testManager) GetValidators(ids.ID) (validators.Set, error) {
|
||||
return nil, nil
|
||||
|
||||
@@ -133,16 +133,13 @@ func (r *vmRegistry) Reload(ctx context.Context) ([]ids.ID, map[ids.ID]error, er
|
||||
return newVMs, failedVMs, nil
|
||||
}
|
||||
|
||||
// Get returns an rpcchainvm-backed factory for the plugin at pluginPath.
|
||||
// The plugin binary is launched lazily on the first factory.New call.
|
||||
func (g *vmGetter) Get(pluginPath string) (vms.Factory, error) {
|
||||
fmt.Printf("[VMGetter] Creating rpcchainvm factory for: %s\n", pluginPath)
|
||||
// VM binaries are executable files that run as gRPC plugins via rpcchainvm
|
||||
// This is the standard approach for EVM and other VM binaries
|
||||
factory := rpcchainvm.NewFactory(
|
||||
return rpcchainvm.NewFactory(
|
||||
pluginPath,
|
||||
g.config.ProcessTracker,
|
||||
g.config.RuntimeTracker,
|
||||
g.config.MetricsGatherer,
|
||||
)
|
||||
fmt.Printf("[VMGetter] Factory created successfully\n")
|
||||
return factory, nil
|
||||
), nil
|
||||
}
|
||||
|
||||
@@ -17,8 +17,6 @@ import (
|
||||
"github.com/luxfi/utxo/secp256k1fx"
|
||||
)
|
||||
|
||||
// BenchmarkLoadUser has been removed - keystore functionality is no longer supported
|
||||
|
||||
// getAllUTXOsBenchmark is a helper func to benchmark the GetAllUTXOs depending on the size
|
||||
func getAllUTXOsBenchmark(b *testing.B, utxoCount int, randSrc rand.Source) {
|
||||
require := require.New(b)
|
||||
|
||||
@@ -194,5 +194,3 @@ func (b *backendVisitor) baseTx(tx *txs.BaseTx) error {
|
||||
tx.InputIDs(),
|
||||
)
|
||||
}
|
||||
|
||||
// Duplicate methods removed - already defined above
|
||||
|
||||
@@ -105,9 +105,6 @@ func TestCryptoKeychain_SLHDSA(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// ML-KEM tests are removed as ML-KEM is for key encapsulation, not signing
|
||||
// and PQKeychain doesn't support generating ML-KEM keys
|
||||
|
||||
func TestCryptoKeychain_MultipleAlgorithms(t *testing.T) {
|
||||
require := require.New(t)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user