mirror of
https://github.com/luxfi/node.git
synced 2026-07-27 03:39:39 +00:00
platformvm: delete dead weak SharedMemory interface declarations
Both executor backends re-declared a local SharedMemory interface with the
weak Apply(map[ids.ID]interface{}, ...interface{}) signature — but nothing
referenced it. The real atomic path uses Runtime.SharedMemory (= the narrow
atomic.SharedMemory: Apply(map[ids.ID]*atomic.Requests, ...database.Batch)).
Pure dead code; removed both. 28 platformvm packages green.
Co-authored-by: Hanzo Dev <dev@hanzo.ai>
This commit is contained in:
@@ -39,12 +39,6 @@ type backend struct {
|
||||
rt *runtime.Runtime
|
||||
}
|
||||
|
||||
// SharedMemory provides cross-chain atomic operations
|
||||
type SharedMemory interface {
|
||||
Get(peerChainID ids.ID, keys [][]byte) ([][]byte, error)
|
||||
Apply(requests map[ids.ID]interface{}, batch ...interface{}) error
|
||||
}
|
||||
|
||||
func (b *backend) GetState(blkID ids.ID) (state.Chain, bool) {
|
||||
b.blkIDToStateLock.RLock()
|
||||
defer b.blkIDToStateLock.RUnlock()
|
||||
|
||||
@@ -6,7 +6,6 @@ package executor
|
||||
import (
|
||||
"github.com/luxfi/runtime"
|
||||
"github.com/luxfi/validators/uptime"
|
||||
"github.com/luxfi/ids"
|
||||
"github.com/luxfi/log"
|
||||
"github.com/luxfi/node/vms/platformvm/config"
|
||||
"github.com/luxfi/node/vms/platformvm/reward"
|
||||
@@ -27,9 +26,3 @@ type Backend struct {
|
||||
Bootstrapped *utils.Atomic[bool]
|
||||
Log log.Logger
|
||||
}
|
||||
|
||||
// SharedMemory provides cross-chain atomic operations
|
||||
type SharedMemory interface {
|
||||
Get(peerChainID ids.ID, keys [][]byte) ([][]byte, error)
|
||||
Apply(requests map[ids.ID]interface{}, batch ...interface{}) error
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user