Files
zeekay ede37547f6 refactor(platformvm): consolidate block code, drop atomic_block, add v0 lift
- Drop atomic_block.go + legacy *_block_test.go (consolidated)
- Add block/v0/ subdir + lift_v0.go for old version handling
- Copyright header: 'Lux Industries, Inc.' → 'Lux Industries Inc' (no comma)
- block_adapter.go: new adapter layer
2026-06-01 15:22:27 -07:00

37 lines
756 B
Go

// Copyright (C) 2019-2025, Lux Industries Inc. All rights reserved.
// See the file LICENSE for licensing terms.
package network
import (
"sync"
"github.com/luxfi/node/vms/platformvm/txs"
)
var _ TxVerifier = (*LockedTxVerifier)(nil)
type TxVerifier interface {
// VerifyTx verifies that the transaction should be issued into the mempool.
VerifyTx(tx *txs.Tx) error
}
type LockedTxVerifier struct {
lock sync.Locker
txVerifier TxVerifier
}
func (l *LockedTxVerifier) VerifyTx(tx *txs.Tx) error {
l.lock.Lock()
defer l.lock.Unlock()
return l.txVerifier.VerifyTx(tx)
}
func NewLockedTxVerifier(lock sync.Locker, txVerifier TxVerifier) *LockedTxVerifier {
return &LockedTxVerifier{
lock: lock,
txVerifier: txVerifier,
}
}