node/node: add GuardianOptionNoAccountant

This commit is contained in:
tbjump 2023-06-08 21:17:05 +00:00 committed by tbjump
parent 8e72f1200d
commit 670117f601
2 changed files with 11 additions and 2 deletions

View File

@ -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 {

View File

@ -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),