diff --git a/config.md b/config.md index 5d67ba4..56e8d20 100644 --- a/config.md +++ b/config.md @@ -44,7 +44,7 @@ |Key|Description|Type|Default Value| |---|-----------|----|-------------| |blockQueueLength|Internal queue length for notifying the confirmations manager of new blocks|`int`|`50` -|fetchReceiptUponEntry|Fetch receipt of new transactions immediately when they are added to the internal queue. When set to false, fetch will only happen when a new block is received or the transaction has been queue for more than the stale receipt timeout|`boolean`|`true` +|fetchReceiptUponEntry|Fetch receipt of new transactions immediately when they are added to the internal queue. When set to false, fetch will only happen when a new block is received or the transaction has been queue for more than the stale receipt timeout|`boolean`|`false` |notificationQueueLength|Internal queue length for notifying the confirmations manager of new transactions/events|`int`|`50` |receiptWorkers|Number of workers to use to query in parallel for receipts|`int`|`10` |required|Number of confirmations required to consider a transaction/event final|`int`|`20` diff --git a/internal/confirmations/confirmations_test.go b/internal/confirmations/confirmations_test.go index aae412e..39d2dd8 100644 --- a/internal/confirmations/confirmations_test.go +++ b/internal/confirmations/confirmations_test.go @@ -462,6 +462,7 @@ func TestBlockConfirmationManagerE2EForkReNotifyConfirmations(t *testing.T) { func TestBlockConfirmationManagerE2ETransactionMovedFork(t *testing.T) { bcm, mca := newTestBlockConfirmationManager(t, true) + bcm.fetchReceiptUponEntry = true // mark fetch receipt upon entry to do a fetch receipt before any blocks were retrieved confirmed := make(chan *apitypes.ConfirmationsNotification, 1) receiptReceived := make(chan *ffcapi.TransactionReceiptResponse, 1) @@ -643,7 +644,7 @@ func TestBlockConfirmationManagerE2ETransactionMovedFork(t *testing.T) { bcm.Stop() mca.AssertExpectations(t) - + // false } func TestBlockConfirmationManagerE2EHistoricalEvent(t *testing.T) { diff --git a/internal/tmconfig/tmconfig.go b/internal/tmconfig/tmconfig.go index a03f418..cf87770 100644 --- a/internal/tmconfig/tmconfig.go +++ b/internal/tmconfig/tmconfig.go @@ -99,7 +99,7 @@ func setDefaults() { viper.SetDefault(string(ConfirmationsRetryInitDelay), "100ms") viper.SetDefault(string(ConfirmationsRetryMaxDelay), "15s") viper.SetDefault(string(ConfirmationsRetryFactor), 2.0) - viper.SetDefault(string(ConfirmationsFetchReceiptUponEntry), true) + viper.SetDefault(string(ConfirmationsFetchReceiptUponEntry), false) viper.SetDefault(string(EventStreamsDefaultsBatchSize), 50) viper.SetDefault(string(EventStreamsDefaultsBatchTimeout), "5s")