From 0e1ccf6481595951d295a13aacc66e79e3cb64e7 Mon Sep 17 00:00:00 2001 From: Nikolay Eskov Date: Wed, 14 Aug 2024 23:41:09 +0300 Subject: [PATCH] Fix lint. --- pkg/ride/tree_evaluation_test.go | 5 ++--- pkg/settings/blockchain_settings.go | 15 ++++++++------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/pkg/ride/tree_evaluation_test.go b/pkg/ride/tree_evaluation_test.go index 9167114113..97d9dd565f 100644 --- a/pkg/ride/tree_evaluation_test.go +++ b/pkg/ride/tree_evaluation_test.go @@ -6184,7 +6184,8 @@ func TestAttachedPaymentsValidation(t *testing.T) { @Callable(i) func invokeNext(amount: Int) = { %s - strict r = addressFromStringValue("3N7Te7NXtGVoQqFqktwrFhQWAkc6J8vfPQ1").invoke("returnPayment", [], [AttachedPayment(unit, amount)]) + let addr = addressFromStringValue("3N7Te7NXtGVoQqFqktwrFhQWAkc6J8vfPQ1") + strict r = addr.invoke("returnPayment", [], [AttachedPayment(unit, amount)]) [] } ` @@ -6211,8 +6212,6 @@ func TestAttachedPaymentsValidation(t *testing.T) { treeTargetHeavy, errs := ridec.CompileToTree(fmt.Sprintf(src2, additionalComplexity)) require.Empty(t, errs) - const oneWaves = 1_0000_0000 - t.Run("payments-check-fix-disabled-no-errors", func(t *testing.T) { createEnv := func(t *testing.T, tree1, tree2 *ast.Tree) *testEnv { return newTestEnv(t).withLibVersion(ast.LibV7).withComplexityLimit(52000). diff --git a/pkg/settings/blockchain_settings.go b/pkg/settings/blockchain_settings.go index 800e9bd5c3..1bb9cc4c92 100644 --- a/pkg/settings/blockchain_settings.go +++ b/pkg/settings/blockchain_settings.go @@ -61,13 +61,14 @@ type FunctionalitySettings struct { AllowMultipleLeaseCancelUntilTime uint64 `json:"allow_multiple_lease_cancel_until_time"` AllowLeasedBalanceTransferUntilTime uint64 `json:"allow_leased_balance_transfer_until_time"` // Timestamps when different kinds of checks become relevant. - CheckTempNegativeAfterTime uint64 `json:"check_temp_negative_after_time"` - TxChangesSortedCheckAfterTime uint64 `json:"tx_changes_sorted_check_after_time"` - TxFromFutureCheckAfterTime uint64 `json:"tx_from_future_check_after_time"` - UnissuedAssetUntilTime uint64 `json:"unissued_asset_until_time"` - InvalidReissueInSameBlockUntilTime uint64 `json:"invalid_reissue_in_same_block_until_time"` - MinimalGeneratingBalanceCheckAfterTime uint64 `json:"minimal_generating_balance_check_after_time"` - PaymentsFixAfterHeight uint64 `json:"payments_fix_after_height"` // paymentsCheckHeight in scala node + CheckTempNegativeAfterTime uint64 `json:"check_temp_negative_after_time"` + TxChangesSortedCheckAfterTime uint64 `json:"tx_changes_sorted_check_after_time"` + TxFromFutureCheckAfterTime uint64 `json:"tx_from_future_check_after_time"` + UnissuedAssetUntilTime uint64 `json:"unissued_asset_until_time"` + InvalidReissueInSameBlockUntilTime uint64 `json:"invalid_reissue_in_same_block_until_time"` + MinimalGeneratingBalanceCheckAfterTime uint64 `json:"minimal_generating_balance_check_after_time"` + // 'paymentsCheckHeight' in scala node - reject any invoke tx after this height if account balance become negative + PaymentsFixAfterHeight uint64 `json:"payments_fix_after_height"` InternalInvokePaymentsValidationAfterHeight uint64 `json:"internal_invoke_payments_validation_after_height"` InternalInvokeCorrectFailRejectBehaviourAfterHeight uint64 `json:"internal_invoke_correct_fail_reject_behaviour_after_height"` InvokeNoZeroPaymentsAfterHeight uint64 `json:"invoke_no_zero_payments_after_height"`