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.
|
// GuardianOptionAccountant configures the Accountant module.
|
||||||
// Requires: wormchainConn
|
// Requires: wormchainConn
|
||||||
func GuardianOptionAccountant(contract string, websocket string, enforcing bool, wormchainConn *wormconn.ClientConn) *GuardianOption {
|
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{
|
guardianOptions := []*GuardianOption{
|
||||||
GuardianOptionDatabase(db),
|
GuardianOptionDatabase(db),
|
||||||
GuardianOptionWatchers(watcherConfigs, nil),
|
GuardianOptionWatchers(watcherConfigs, nil),
|
||||||
GuardianOptionAccountant("", "", false, nil), // effectively disable accountant
|
GuardianOptionNoAccountant(), // disable accountant
|
||||||
GuardianOptionGovernor(false), // disable governor
|
GuardianOptionGovernor(false), // disable governor
|
||||||
GuardianOptionP2P(gs[mockGuardianIndex].p2pKey, networkID, bootstrapPeers, nodeName, false, p2pPort, func() string { return "" }),
|
GuardianOptionP2P(gs[mockGuardianIndex].p2pKey, networkID, bootstrapPeers, nodeName, false, p2pPort, func() string { return "" }),
|
||||||
GuardianOptionPublicRpcSocket(publicSocketPath, common.GrpcLogDetailFull),
|
GuardianOptionPublicRpcSocket(publicSocketPath, common.GrpcLogDetailFull),
|
||||||
GuardianOptionPublicrpcTcpService(publicRpc, common.GrpcLogDetailFull),
|
GuardianOptionPublicrpcTcpService(publicRpc, common.GrpcLogDetailFull),
|
||||||
|
|
Loading…
Reference in New Issue