Skip to content

Commit 64d6392

Browse files
gastonpontipalango
authored andcommitted
Burn logic space
1 parent 2cdccd4 commit 64d6392

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

core/state_transition.go

+11-7
Original file line numberDiff line numberDiff line change
@@ -630,14 +630,18 @@ func (st *StateTransition) distributeTxFees() error {
630630
"coinbaseFeeRecipient", st.evm.Context.Coinbase, "coinbaseFee", tipTxFee,
631631
"comunityFundRecipient", governanceAddress, "communityFundFee", baseTxFee)
632632
if feeCurrency == nil {
633-
if gatewayFeeRecipient != &common.ZeroAddress {
634-
st.state.AddBalance(*gatewayFeeRecipient, st.msg.GatewayFee())
635-
}
636-
if governanceAddress != common.ZeroAddress {
637-
st.state.AddBalance(governanceAddress, baseTxFee)
633+
if !st.evm.ChainConfig().IsGFork(st.evm.Context.BlockNumber) {
634+
if gatewayFeeRecipient != &common.ZeroAddress {
635+
st.state.AddBalance(*gatewayFeeRecipient, st.msg.GatewayFee())
636+
}
637+
if governanceAddress != common.ZeroAddress {
638+
st.state.AddBalance(governanceAddress, baseTxFee)
639+
}
640+
st.state.AddBalance(st.evm.Context.Coinbase, tipTxFee)
641+
st.state.AddBalance(from, refund)
642+
} else {
643+
// TODO, volpe's burn logic
638644
}
639-
st.state.AddBalance(st.evm.Context.Coinbase, tipTxFee)
640-
st.state.AddBalance(from, refund)
641645
} else {
642646
if err = st.creditGasFees(from, st.evm.Context.Coinbase, gatewayFeeRecipient, governanceAddress, refund, tipTxFee, st.msg.GatewayFee(), baseTxFee, feeCurrency); err != nil {
643647
log.Error("Error crediting", "from", from, "coinbase", st.evm.Context.Coinbase, "gateway", gatewayFeeRecipient, "fund", governanceAddress)

0 commit comments

Comments
 (0)