node/node: add GuardianOptionNoAccountant
This commit is contained in:
parent
8e72f1200d
commit
670117f601
|
@ -85,6 +85,15 @@ func GuardianOptionP2P(p2pKey libp2p_crypto.PrivKey, networkId string, bootstrap
|
|||
}}
|
||||
}
|
||||
|
||||
func GuardianOptionNoAccountant() *GuardianOption {
|
||||
return &GuardianOption{
|
||||
name: "accountant",
|
||||
f: func(ctx context.Context, logger *zap.Logger, g *G) error {
|
||||
logger.Info("acct: accountant is disabled", zap.String("component", "gacct"))
|
||||
return nil
|
||||
}}
|
||||
}
|
||||
|
||||
// GuardianOptionAccountant configures the Accountant module.
|
||||
// Requires: wormchainConn
|
||||
func GuardianOptionAccountant(contract string, websocket string, enforcing bool, wormchainConn *wormconn.ClientConn) *GuardianOption {
|
||||
|
|
|
@ -155,8 +155,8 @@ func mockGuardianRunnable(gs []*mockGuardian, mockGuardianIndex uint, obsDb mock
|
|||
guardianOptions := []*GuardianOption{
|
||||
GuardianOptionDatabase(db),
|
||||
GuardianOptionWatchers(watcherConfigs, nil),
|
||||
GuardianOptionAccountant("", "", false, nil), // effectively disable accountant
|
||||
GuardianOptionGovernor(false), // disable governor
|
||||
GuardianOptionNoAccountant(), // disable accountant
|
||||
GuardianOptionGovernor(false), // disable governor
|
||||
GuardianOptionP2P(gs[mockGuardianIndex].p2pKey, networkID, bootstrapPeers, nodeName, false, p2pPort, func() string { return "" }),
|
||||
GuardianOptionPublicRpcSocket(publicSocketPath, common.GrpcLogDetailFull),
|
||||
GuardianOptionPublicrpcTcpService(publicRpc, common.GrpcLogDetailFull),
|
||||
|
|
Loading…
Reference in New Issue