good morning!!!!

Skip to content
Snippets Groups Projects
Unverified Commit 223f6a88 authored by Jaynti Kanani's avatar Jaynti Kanani
Browse files

no log for 0 matic transfer

parent 15aeef09
No related branches found
No related tags found
No related merge requests found
...@@ -238,20 +238,18 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, failed bo ...@@ -238,20 +238,18 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, failed bo
output2 := new(big.Int).SetBytes(input2.Bytes()) output2 := new(big.Int).SetBytes(input2.Bytes())
// add transfer log // add transfer log
if amount.Cmp(bigZero) > 0 { AddFeeTransferLog(
AddFeeTransferLog( st.state,
st.state,
msg.From(),
msg.From(), st.evm.Coinbase,
st.evm.Coinbase,
amount,
amount, input1,
input1, input2,
input2, output1.Sub(output1, amount),
output1.Sub(output1, amount), output2.Add(output2, amount),
output2.Add(output2, amount), )
)
}
return ret, st.gasUsed(), vmerr != nil, err return ret, st.gasUsed(), vmerr != nil, err
} }
...@@ -348,6 +346,11 @@ func addTransferLog( ...@@ -348,6 +346,11 @@ func addTransferLog(
output1, output1,
output2 *big.Int, output2 *big.Int,
) { ) {
// ignore if amount is 0
if amount.Cmp(bigZero) <= 0 {
return
}
dataInputs := []*big.Int{ dataInputs := []*big.Int{
amount, amount,
input1, input1,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment