forked from TrueCloudLab/frostfs-node
[#338] ir: Drop container notaryless code
Signed-off-by: Dmitrii Stepanov <d.stepanov@yadro.com>
This commit is contained in:
parent
03ab0ca30f
commit
fb708b3a2d
5 changed files with 66 additions and 121 deletions
|
@ -6,13 +6,12 @@ import (
|
|||
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/internal/logs"
|
||||
containercore "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/core/container"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client"
|
||||
cntClient "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/container"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client/frostfsid"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event"
|
||||
containerEvent "git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/event/container"
|
||||
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/util/logger"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/mempoolevent"
|
||||
"github.com/nspcc-dev/neo-go/pkg/core/transaction"
|
||||
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
|
||||
"github.com/nspcc-dev/neo-go/pkg/util"
|
||||
"github.com/panjf2000/ants/v2"
|
||||
|
@ -27,11 +26,11 @@ type (
|
|||
|
||||
ContClient interface {
|
||||
ContractAddress() util.Uint160
|
||||
Morph() *client.Client
|
||||
Put(p cntClient.PutPrm) error
|
||||
Get(cid []byte) (*containercore.Container, error)
|
||||
Delete(p cntClient.DeletePrm) error
|
||||
PutEACL(p cntClient.PutEACLPrm) error
|
||||
}
|
||||
|
||||
MorphClient interface {
|
||||
NotarySignAndInvokeTX(mainTx *transaction.Transaction) error
|
||||
}
|
||||
|
||||
IDClient interface {
|
||||
|
@ -40,13 +39,13 @@ type (
|
|||
|
||||
// Processor of events produced by container contract in the sidechain.
|
||||
Processor struct {
|
||||
log *logger.Logger
|
||||
pool *ants.Pool
|
||||
alphabetState AlphabetState
|
||||
cnrClient ContClient // notary must be enabled
|
||||
idClient IDClient
|
||||
netState NetworkState
|
||||
notaryDisabled bool
|
||||
log *logger.Logger
|
||||
pool *ants.Pool
|
||||
alphabetState AlphabetState
|
||||
cnrClient ContClient // notary must be enabled
|
||||
morphClient MorphClient
|
||||
idClient IDClient
|
||||
netState NetworkState
|
||||
}
|
||||
|
||||
// Params of the processor constructor.
|
||||
|
@ -55,9 +54,9 @@ type (
|
|||
PoolSize int
|
||||
AlphabetState AlphabetState
|
||||
ContainerClient ContClient
|
||||
MorphClient MorphClient
|
||||
FrostFSIDClient IDClient
|
||||
NetworkState NetworkState
|
||||
NotaryDisabled bool
|
||||
}
|
||||
)
|
||||
|
||||
|
@ -88,6 +87,8 @@ func New(p *Params) (*Processor, error) {
|
|||
return nil, errors.New("ir/container: global state is not set")
|
||||
case p.ContainerClient == nil:
|
||||
return nil, errors.New("ir/container: Container client is not set")
|
||||
case p.MorphClient == nil:
|
||||
return nil, errors.New("ir/container: Morph client is not set")
|
||||
case p.FrostFSIDClient == nil:
|
||||
return nil, errors.New("ir/container: FrostFS ID client is not set")
|
||||
case p.NetworkState == nil:
|
||||
|
@ -102,13 +103,13 @@ func New(p *Params) (*Processor, error) {
|
|||
}
|
||||
|
||||
return &Processor{
|
||||
log: p.Log,
|
||||
pool: pool,
|
||||
alphabetState: p.AlphabetState,
|
||||
cnrClient: p.ContainerClient,
|
||||
idClient: p.FrostFSIDClient,
|
||||
netState: p.NetworkState,
|
||||
notaryDisabled: p.NotaryDisabled,
|
||||
log: p.Log,
|
||||
pool: pool,
|
||||
alphabetState: p.AlphabetState,
|
||||
cnrClient: p.ContainerClient,
|
||||
idClient: p.FrostFSIDClient,
|
||||
netState: p.NetworkState,
|
||||
morphClient: p.MorphClient,
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue