From 8ead35d926a1316f53faf8d73335a433182d25a1 Mon Sep 17 00:00:00 2001 From: "Simon.Z" Date: Mon, 10 Jul 2023 15:28:58 -0700 Subject: [PATCH] add transfer for MTR movement from validator benefit to eMTRG map --- runtime/runtime.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/runtime/runtime.go b/runtime/runtime.go index eb987de4..040b96c9 100644 --- a/runtime/runtime.go +++ b/runtime/runtime.go @@ -445,6 +445,14 @@ func (rt *Runtime) EnforceTeslaFork10_Corrections(stateDB *statedb.StateDB, bloc log.Info("Before moving MTR", "validatorBenefit", rt.state.GetEnergy(meter.ValidatorBenefitAddr), "toAddr", rt.state.GetEnergy(toAddr)) rt.state.SetEnergy(meter.ValidatorBenefitAddr, reserve) rt.state.SetEnergy(toAddr, new(big.Int).Add(toEnergy, moved)) + + stateDB.AddTransfer(&tx.Transfer{ + Sender: meter.Address(meter.ValidatorBenefitAddr), + Recipient: meter.Address(toAddr), + Amount: moved, + Token: 0, + }) + log.Info("After moving MTR", "validatorBenefit", rt.state.GetEnergy(meter.ValidatorBenefitAddr), "toAddr", rt.state.GetEnergy(toAddr)) }