Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions internal/assets/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,14 +82,14 @@ type assetManager struct {
keyNormalization int
}

func NewAssetManager(ctx context.Context, di database.Plugin, im identity.Manager, dm data.Manager, sa syncasync.Bridge, bm broadcast.Manager, pm privatemessaging.Manager, ti map[string]tokens.Plugin, mm metrics.Manager, om operations.Manager) (Manager, error) {
func NewAssetManager(ctx context.Context, di database.Plugin, im identity.Manager, dm data.Manager, sa syncasync.Bridge, bm broadcast.Manager, pm privatemessaging.Manager, ti map[string]tokens.Plugin, mm metrics.Manager, om operations.Manager, txHelper txcommon.Helper) (Manager, error) {
if di == nil || im == nil || sa == nil || bm == nil || pm == nil || ti == nil || mm == nil || om == nil {
return nil, i18n.NewError(ctx, i18n.MsgInitializationNilDepError)
}
am := &assetManager{
ctx: ctx,
database: di,
txHelper: txcommon.NewTransactionHelper(di),
txHelper: txHelper,
identity: im,
data: dm,
syncasync: sa,
Expand Down
9 changes: 6 additions & 3 deletions internal/assets/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"testing"

"github.com/hyperledger/firefly/internal/config"
"github.com/hyperledger/firefly/internal/txcommon"
"github.com/hyperledger/firefly/mocks/broadcastmocks"
"github.com/hyperledger/firefly/mocks/databasemocks"
"github.com/hyperledger/firefly/mocks/datamocks"
Expand Down Expand Up @@ -47,11 +48,12 @@ func newTestAssets(t *testing.T) (*assetManager, func()) {
mti := &tokenmocks.Plugin{}
mm := &metricsmocks.Manager{}
mom := &operationmocks.Manager{}
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
mti.On("Name").Return("ut_tokens").Maybe()
mm.On("IsMetricsEnabled").Return(false)
mom.On("RegisterHandler", mock.Anything, mock.Anything, mock.Anything)
ctx, cancel := context.WithCancel(context.Background())
a, err := NewAssetManager(ctx, mdi, mim, mdm, msa, mbm, mpm, map[string]tokens.Plugin{"magic-tokens": mti}, mm, mom)
a, err := NewAssetManager(ctx, mdi, mim, mdm, msa, mbm, mpm, map[string]tokens.Plugin{"magic-tokens": mti}, mm, mom, txHelper)
rag := mdi.On("RunAsGroup", mock.Anything, mock.Anything).Maybe()
rag.RunFn = func(a mock.Arguments) {
rag.ReturnArguments = mock.Arguments{a[1].(func(context.Context) error)(a[0].(context.Context))}
Expand All @@ -73,12 +75,13 @@ func newTestAssetsWithMetrics(t *testing.T) (*assetManager, func()) {
mti := &tokenmocks.Plugin{}
mm := &metricsmocks.Manager{}
mom := &operationmocks.Manager{}
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
mti.On("Name").Return("ut_tokens").Maybe()
mm.On("IsMetricsEnabled").Return(true)
mm.On("TransferSubmitted", mock.Anything)
mom.On("RegisterHandler", mock.Anything, mock.Anything, mock.Anything)
ctx, cancel := context.WithCancel(context.Background())
a, err := NewAssetManager(ctx, mdi, mim, mdm, msa, mbm, mpm, map[string]tokens.Plugin{"magic-tokens": mti}, mm, mom)
a, err := NewAssetManager(ctx, mdi, mim, mdm, msa, mbm, mpm, map[string]tokens.Plugin{"magic-tokens": mti}, mm, mom, txHelper)
rag := mdi.On("RunAsGroup", mock.Anything, mock.Anything).Maybe()
rag.RunFn = func(a mock.Arguments) {
rag.ReturnArguments = mock.Arguments{a[1].(func(context.Context) error)(a[0].(context.Context))}
Expand All @@ -90,7 +93,7 @@ func newTestAssetsWithMetrics(t *testing.T) (*assetManager, func()) {
}

func TestInitFail(t *testing.T) {
_, err := NewAssetManager(context.Background(), nil, nil, nil, nil, nil, nil, nil, nil, nil)
_, err := NewAssetManager(context.Background(), nil, nil, nil, nil, nil, nil, nil, nil, nil, nil)
assert.Regexp(t, "FF10128", err)
}

Expand Down
24 changes: 17 additions & 7 deletions internal/batch/batch_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@ import (
"github.com/hyperledger/firefly/internal/log"
"github.com/hyperledger/firefly/internal/retry"
"github.com/hyperledger/firefly/internal/sysmessaging"
"github.com/hyperledger/firefly/internal/txcommon"
"github.com/hyperledger/firefly/pkg/database"
"github.com/hyperledger/firefly/pkg/fftypes"
)

func NewBatchManager(ctx context.Context, ni sysmessaging.LocalNodeInfo, di database.Plugin, dm data.Manager) (Manager, error) {
func NewBatchManager(ctx context.Context, ni sysmessaging.LocalNodeInfo, di database.Plugin, dm data.Manager, txHelper txcommon.Helper) (Manager, error) {
if di == nil || dm == nil {
return nil, i18n.NewError(ctx, i18n.MsgInitializationNilDepError)
}
Expand All @@ -44,11 +45,13 @@ func NewBatchManager(ctx context.Context, ni sysmessaging.LocalNodeInfo, di data
ni: ni,
database: di,
data: dm,
txHelper: txHelper,
readOffset: -1, // On restart we trawl for all ready messages
readPageSize: uint64(readPageSize),
messagePollTimeout: config.GetDuration(config.BatchManagerReadPollTimeout),
startupOffsetRetryAttempts: config.GetInt(config.OrchestratorStartupAttempts),
dispatchers: make(map[string]*dispatcher),
dispatcherMap: make(map[string]*dispatcher),
allDispatchers: make([]*dispatcher, 0),
newMessages: make(chan int64, 1),
done: make(chan struct{}),
retry: &retry.Retry{
Expand Down Expand Up @@ -85,8 +88,10 @@ type batchManager struct {
ni sysmessaging.LocalNodeInfo
database database.Plugin
data data.Manager
txHelper txcommon.Helper
dispatcherMux sync.Mutex
dispatchers map[string]*dispatcher
dispatcherMap map[string]*dispatcher
allDispatchers []*dispatcher
newMessages chan int64
done chan struct{}
retry *retry.Retry
Expand Down Expand Up @@ -122,14 +127,18 @@ func (bm *batchManager) getDispatcherKey(txType fftypes.TransactionType, msgType
}

func (bm *batchManager) RegisterDispatcher(name string, txType fftypes.TransactionType, msgTypes []fftypes.MessageType, handler DispatchHandler, options DispatcherOptions) {
bm.dispatcherMux.Lock()
defer bm.dispatcherMux.Unlock()

dispatcher := &dispatcher{
name: name,
handler: handler,
options: options,
processors: make(map[string]*batchProcessor),
}
bm.allDispatchers = append(bm.allDispatchers, dispatcher)
for _, msgType := range msgTypes {
bm.dispatchers[bm.getDispatcherKey(txType, msgType)] = dispatcher
bm.dispatcherMap[bm.getDispatcherKey(txType, msgType)] = dispatcher
}
}

Expand All @@ -147,7 +156,7 @@ func (bm *batchManager) getProcessor(txType fftypes.TransactionType, msgType fft
defer bm.dispatcherMux.Unlock()

dispatcherKey := bm.getDispatcherKey(txType, msgType)
dispatcher, ok := bm.dispatchers[dispatcherKey]
dispatcher, ok := bm.dispatcherMap[dispatcherKey]
if !ok {
return nil, i18n.NewError(bm.ctx, i18n.MsgUnregisteredBatchType, dispatcherKey)
}
Expand All @@ -170,6 +179,7 @@ func (bm *batchManager) getProcessor(txType fftypes.TransactionType, msgType fft
dispatch: dispatcher.handler,
},
bm.retry,
bm.txHelper,
)
dispatcher.processors[name] = processor
}
Expand Down Expand Up @@ -316,7 +326,7 @@ func (bm *batchManager) dispatchMessage(processor *batchProcessor, msg *fftypes.
func (bm *batchManager) reapQuiescing() {
bm.dispatcherMux.Lock()
var reaped []*batchProcessor
for _, d := range bm.dispatchers {
for _, d := range bm.allDispatchers {
for k, p := range d.processors {
select {
case <-p.quescing:
Expand Down Expand Up @@ -344,7 +354,7 @@ func (bm *batchManager) getProcessors() []*batchProcessor {
defer bm.dispatcherMux.Unlock()

var processors []*batchProcessor
for _, d := range bm.dispatchers {
for _, d := range bm.allDispatchers {
for _, p := range d.processors {
processors = append(processors, p)
}
Expand Down
45 changes: 30 additions & 15 deletions internal/batch/batch_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import (
"github.com/hyperledger/firefly/internal/config"
"github.com/hyperledger/firefly/internal/data"
"github.com/hyperledger/firefly/internal/log"
"github.com/hyperledger/firefly/internal/txcommon"
"github.com/hyperledger/firefly/mocks/databasemocks"
"github.com/hyperledger/firefly/mocks/datamocks"
"github.com/hyperledger/firefly/mocks/sysmessagingmocks"
Expand All @@ -41,6 +42,7 @@ func TestE2EDispatchBroadcast(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
mni.On("GetNodeUUID", mock.Anything).Return(fftypes.NewUUID())
readyForDispatch := make(chan bool)
waitForDispatch := make(chan *DispatchState)
Expand Down Expand Up @@ -70,7 +72,7 @@ func TestE2EDispatchBroadcast(t *testing.T) {
return nil
}
ctx, cancel := context.WithCancel(context.Background())
bmi, _ := NewBatchManager(ctx, mni, mdi, mdm)
bmi, _ := NewBatchManager(ctx, mni, mdi, mdm, txHelper)
bm := bmi.(*batchManager)

bm.RegisterDispatcher("utdispatcher", fftypes.TransactionTypeBatchPin, []fftypes.MessageType{fftypes.MessageTypeBroadcast}, handler, DispatcherOptions{
Expand Down Expand Up @@ -155,6 +157,7 @@ func TestE2EDispatchPrivateUnpinned(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
mni.On("GetNodeUUID", mock.Anything).Return(fftypes.NewUUID())
readyForDispatch := make(chan bool)
waitForDispatch := make(chan *DispatchState)
Expand Down Expand Up @@ -187,7 +190,7 @@ func TestE2EDispatchPrivateUnpinned(t *testing.T) {
return nil
}
ctx, cancel := context.WithCancel(context.Background())
bmi, _ := NewBatchManager(ctx, mni, mdi, mdm)
bmi, _ := NewBatchManager(ctx, mni, mdi, mdm, txHelper)
bm := bmi.(*batchManager)

bm.RegisterDispatcher("utdispatcher", fftypes.TransactionTypeBatchPin, []fftypes.MessageType{fftypes.MessageTypePrivate}, handler, DispatcherOptions{
Expand Down Expand Up @@ -268,8 +271,9 @@ func TestDispatchUnknownType(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
ctx, cancel := context.WithCancel(context.Background())
bmi, _ := NewBatchManager(ctx, mni, mdi, mdm)
bmi, _ := NewBatchManager(ctx, mni, mdi, mdm, txHelper)
bm := bmi.(*batchManager)

msg := &fftypes.Message{}
Expand All @@ -285,7 +289,7 @@ func TestDispatchUnknownType(t *testing.T) {
}

func TestInitFailNoPersistence(t *testing.T) {
_, err := NewBatchManager(context.Background(), nil, nil, nil)
_, err := NewBatchManager(context.Background(), nil, nil, nil, nil)
assert.Error(t, err)
}

Expand All @@ -294,7 +298,8 @@ func TestGetInvalidBatchTypeMsg(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm)
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm, txHelper)
defer bm.Close()
_, err := bm.(*batchManager).getProcessor(fftypes.BatchTypeBroadcast, "wrong", nil, "ns1", &fftypes.SignerRef{})
assert.Regexp(t, "FF10126", err)
Expand All @@ -304,8 +309,9 @@ func TestMessageSequencerCancelledContext(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
mdi.On("GetMessages", mock.Anything, mock.Anything, mock.Anything).Return(nil, nil, fmt.Errorf("pop"))
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm)
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm, txHelper)
defer bm.Close()
ctx, cancel := context.WithCancel(context.Background())
cancel()
Expand All @@ -318,7 +324,8 @@ func TestMessageSequencerMissingMessageData(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm)
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm, txHelper)
bm.RegisterDispatcher("utdispatcher", fftypes.TransactionTypeNone, []fftypes.MessageType{fftypes.MessageTypeBroadcast},
func(c context.Context, state *DispatchState) error {
return nil
Expand Down Expand Up @@ -359,9 +366,10 @@ func TestMessageSequencerUpdateMessagesFail(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
mni.On("GetNodeUUID", mock.Anything).Return(fftypes.NewUUID())
ctx, cancelCtx := context.WithCancel(context.Background())
bm, _ := NewBatchManager(ctx, mni, mdi, mdm)
bm, _ := NewBatchManager(ctx, mni, mdi, mdm, txHelper)
bm.RegisterDispatcher("utdispatcher", fftypes.TransactionTypeBatchPin, []fftypes.MessageType{fftypes.MessageTypeBroadcast},
func(c context.Context, state *DispatchState) error {
return nil
Expand Down Expand Up @@ -414,8 +422,9 @@ func TestMessageSequencerDispatchFail(t *testing.T) {
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
mni.On("GetNodeUUID", mock.Anything).Return(fftypes.NewUUID())
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
ctx, cancelCtx := context.WithCancel(context.Background())
bm, _ := NewBatchManager(ctx, mni, mdi, mdm)
bm, _ := NewBatchManager(ctx, mni, mdi, mdm, txHelper)
bm.RegisterDispatcher("utdispatcher", fftypes.TransactionTypeBatchPin, []fftypes.MessageType{fftypes.MessageTypeBroadcast},
func(c context.Context, state *DispatchState) error {
cancelCtx()
Expand Down Expand Up @@ -454,7 +463,8 @@ func TestMessageSequencerUpdateBatchFail(t *testing.T) {
mni := &sysmessagingmocks.LocalNodeInfo{}
mni.On("GetNodeUUID", mock.Anything).Return(fftypes.NewUUID())
ctx, cancelCtx := context.WithCancel(context.Background())
bm, _ := NewBatchManager(ctx, mni, mdi, mdm)
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
bm, _ := NewBatchManager(ctx, mni, mdi, mdm, txHelper)
bm.RegisterDispatcher("utdispatcher", fftypes.TransactionTypeBatchPin, []fftypes.MessageType{fftypes.MessageTypeBroadcast},
func(c context.Context, state *DispatchState) error {
return nil
Expand Down Expand Up @@ -504,7 +514,8 @@ func TestWaitForPollTimeout(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm)
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm, txHelper)
bm.(*batchManager).messagePollTimeout = 1 * time.Microsecond
bm.(*batchManager).waitForNewMessages()
}
Expand All @@ -513,7 +524,8 @@ func TestWaitForNewMessage(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
bmi, _ := NewBatchManager(context.Background(), mni, mdi, mdm)
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
bmi, _ := NewBatchManager(context.Background(), mni, mdi, mdm, txHelper)
bm := bmi.(*batchManager)
bm.readOffset = 22222
bm.NewMessages() <- 12345
Expand All @@ -525,7 +537,8 @@ func TestAssembleMessageDataNilData(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm)
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm, txHelper)
bm.Close()
mdm.On("GetMessageDataCached", mock.Anything, mock.Anything).Return(nil, false, nil)
_, err := bm.(*batchManager).assembleMessageData(fftypes.BatchTypePrivate, &fftypes.Message{
Expand All @@ -541,7 +554,8 @@ func TestGetMessageDataFail(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm)
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm, txHelper)
mdm.On("GetMessageDataCached", mock.Anything, mock.Anything).Return(nil, false, fmt.Errorf("pop"))
bm.Close()
_, _ = bm.(*batchManager).assembleMessageData(fftypes.BatchTypePrivate, &fftypes.Message{
Expand All @@ -559,7 +573,8 @@ func TestGetMessageNotFound(t *testing.T) {
mdi := &databasemocks.Plugin{}
mdm := &datamocks.Manager{}
mni := &sysmessagingmocks.LocalNodeInfo{}
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm)
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
bm, _ := NewBatchManager(context.Background(), mni, mdi, mdm, txHelper)
mdm.On("GetMessageDataCached", mock.Anything, mock.Anything, data.CRORequirePublicBlobRefs).Return(nil, false, nil)
bm.Close()
_, err := bm.(*batchManager).assembleMessageData(fftypes.BatchTypeBroadcast, &fftypes.Message{
Expand Down
4 changes: 2 additions & 2 deletions internal/batch/batch_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ type DispatchState struct {

const batchSizeEstimateBase = int64(512)

func newBatchProcessor(ctx context.Context, ni sysmessaging.LocalNodeInfo, di database.Plugin, dm data.Manager, conf *batchProcessorConf, baseRetryConf *retry.Retry) *batchProcessor {
func newBatchProcessor(ctx context.Context, ni sysmessaging.LocalNodeInfo, di database.Plugin, dm data.Manager, conf *batchProcessorConf, baseRetryConf *retry.Retry, txHelper txcommon.Helper) *batchProcessor {
pCtx := log.WithLogField(log.WithLogField(ctx, "d", conf.dispatcherName), "p", conf.name)
pCtx, cancelCtx := context.WithCancel(pCtx)
bp := &batchProcessor{
Expand All @@ -110,7 +110,7 @@ func newBatchProcessor(ctx context.Context, ni sysmessaging.LocalNodeInfo, di da
ni: ni,
database: di,
data: dm,
txHelper: txcommon.NewTransactionHelper(di),
txHelper: txHelper,
newWork: make(chan *batchWork, conf.BatchMaxSize),
quescing: make(chan bool, 1),
done: make(chan struct{}),
Expand Down
4 changes: 3 additions & 1 deletion internal/batch/batch_processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
"github.com/hyperledger/firefly/internal/config"
"github.com/hyperledger/firefly/internal/log"
"github.com/hyperledger/firefly/internal/retry"
"github.com/hyperledger/firefly/internal/txcommon"
"github.com/hyperledger/firefly/mocks/databasemocks"
"github.com/hyperledger/firefly/mocks/datamocks"
"github.com/hyperledger/firefly/mocks/sysmessagingmocks"
Expand All @@ -36,6 +37,7 @@ func newTestBatchProcessor(dispatch DispatchHandler) (*databasemocks.Plugin, *ba
mdi := &databasemocks.Plugin{}
mni := &sysmessagingmocks.LocalNodeInfo{}
mdm := &datamocks.Manager{}
txHelper := txcommon.NewTransactionHelper(mdi, mdm)
mni.On("GetNodeUUID", mock.Anything).Return(fftypes.NewUUID()).Maybe()
bp := newBatchProcessor(context.Background(), mni, mdi, mdm, &batchProcessorConf{
namespace: "ns1",
Expand All @@ -51,7 +53,7 @@ func newTestBatchProcessor(dispatch DispatchHandler) (*databasemocks.Plugin, *ba
}, &retry.Retry{
InitialDelay: 1 * time.Microsecond,
MaximumDelay: 1 * time.Microsecond,
})
}, txHelper)
bp.txHelper = &txcommonmocks.Helper{}
return mdi, bp
}
Expand Down
6 changes: 6 additions & 0 deletions internal/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,10 @@ var (
SubscriptionsRetryMaxDelay = rootKey("subscription.retry.maxDelay")
// SubscriptionsRetryFactor the backoff factor to use for retry of database operations
SubscriptionsRetryFactor = rootKey("subscription.retry.factor")
// TransactionCacheSize
TransactionCacheSize = rootKey("transaction.cache.size")
// TransactionCacheTTL
TransactionCacheTTL = rootKey("transaction.cache.ttl")
// AssetManagerKeyNormalization mechanism to normalize keys before using them. Valid options: "blockchain_plugin" - use blockchain plugin (default), "none" - do not attempt normalization
AssetManagerKeyNormalization = rootKey("asset.manager.keyNormalization")
// UIEnabled set to false to disable the UI (default is true, so UI will be enabled if ui.path is valid)
Expand Down Expand Up @@ -365,6 +369,8 @@ func Reset() {
viper.SetDefault(string(SubscriptionsRetryInitialDelay), "250ms")
viper.SetDefault(string(SubscriptionsRetryMaxDelay), "30s")
viper.SetDefault(string(SubscriptionsRetryFactor), 2.0)
viper.SetDefault(string(TransactionCacheSize), "1Mb")
viper.SetDefault(string(TransactionCacheTTL), "5m")
viper.SetDefault(string(UIEnabled), true)
viper.SetDefault(string(ValidatorCacheSize), "1Mb")
viper.SetDefault(string(ValidatorCacheTTL), "1h")
Expand Down
Loading