From d4341e1b393c9a21e22e76a72ee9abd439328461 Mon Sep 17 00:00:00 2001 From: Marko Boben Date: Mon, 21 Aug 2023 23:32:41 +0200 Subject: [PATCH] Changed current time for delegator tx --- .../vms/platformvm/txs/executor/proposal_tx_executor.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/avalanchego/vms/platformvm/txs/executor/proposal_tx_executor.go b/avalanchego/vms/platformvm/txs/executor/proposal_tx_executor.go index b4e30ace..9922cb60 100644 --- a/avalanchego/vms/platformvm/txs/executor/proposal_tx_executor.go +++ b/avalanchego/vms/platformvm/txs/executor/proposal_tx_executor.go @@ -381,8 +381,9 @@ func (e *ProposalTxExecutor) AddDelegatorTx(tx *txs.AddDelegatorTx) error { return state.ErrMissingParentState } currentTimestamp := parentState.GetTimestamp() + now := e.Clk.Time() - _, maxValidatorStake, minDelegatorStake, _, _, minDelegateDuration, maxStakeDuration, minFutureStartTimeOffset, maxValidatorWeightFactor, _ := GetCurrentInflationSettings(currentTimestamp, e.Backend.Ctx.NetworkID, e.Config) + _, maxValidatorStake, minDelegatorStake, _, _, minDelegateDuration, maxStakeDuration, minFutureStartTimeOffset, maxValidatorWeightFactor, _ := GetCurrentInflationSettings(now, e.Backend.Ctx.NetworkID, e.Config) duration := tx.Validator.Duration() switch {