mirror of
https://github.com/luxfi/chains.git
synced 2026-09-24 00:26:00 +00:00
Under LP-0130's canonical roster, chains/thresholdvm/ hosts the M-Chain VM (MPC threshold signing). The package name "thresholdvm" was the last piece of T-Chain nomenclature still shipping in code — legacy from the pre-LP-134 shared-substrate design. Renamed to mpcvm/ so the package name matches the M-Chain letter and LP-7100 spec. - chains/thresholdvm/ → chains/mpcvm/ (dir + inner files + package decl) - Sed-replace thresholdvm → mpcvm across .go / .md / .yml / .json / .sh - Fee/settlement primitive references now say mpcvm - LLM.md canonical chain roster (LP-0130) already points at mpcvm/ F-Chain runtime pieces (fhe/, protocol/tfhe_keygen/, runtime/f_chain_adapter.go) stay under mpcvm/ for now — they consume the same shared threshold primitives. A follow-up extract to chains/fhevm/ can happen once F-Chain runtime graduates. Co-authored-by: Hanzo Dev <[email protected]>
33 lines
960 B
Go
33 lines
960 B
Go
// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
package mpcvm
|
|
|
|
import (
|
|
"errors"
|
|
"testing"
|
|
|
|
"github.com/luxfi/log"
|
|
"github.com/luxfi/node/vms/types/fee"
|
|
)
|
|
|
|
func TestThresholdVM_FeePolicy_IsNoUserTxSentinel(t *testing.T) {
|
|
v := &VM{log: log.NewNoOpLogger(), feePolicy: newFeePolicy()}
|
|
if v.FeePolicy() == nil {
|
|
t.Fatal("FeePolicy() = nil; want NoUserTxPolicy")
|
|
}
|
|
if _, ok := v.FeePolicy().(fee.NoUserTxPolicy); !ok {
|
|
t.Fatalf("FeePolicy() = %T, want NoUserTxPolicy", v.FeePolicy())
|
|
}
|
|
if err := fee.Validate(v.FeePolicy()); err != nil {
|
|
t.Errorf("fee.Validate(NoUserTxPolicy) = %v, want nil", err)
|
|
}
|
|
}
|
|
|
|
func TestThresholdVM_FeePolicy_RejectsAllUserTx(t *testing.T) {
|
|
v := &VM{log: log.NewNoOpLogger(), feePolicy: newFeePolicy()}
|
|
if err := v.gateUserTx(); !errors.Is(err, fee.ErrChainAcceptsNoUserTxs) {
|
|
t.Fatalf("gateUserTx() = %v, want ErrChainAcceptsNoUserTxs", err)
|
|
}
|
|
}
|