good morning!!!!

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

add fees log if fees > 0

parent 4ea1f338
No related branches found
No related tags found
No related merge requests found
...@@ -35,6 +35,7 @@ var ( ...@@ -35,6 +35,7 @@ var (
var transferLogSig = common.HexToHash("0xe6497e3ee548a3372136af2fcb0696db31fc6cf20260707645068bd3fe97f3c4") var transferLogSig = common.HexToHash("0xe6497e3ee548a3372136af2fcb0696db31fc6cf20260707645068bd3fe97f3c4")
var transferFeeLogSig = common.HexToHash("0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63") var transferFeeLogSig = common.HexToHash("0x4dfe1bbbcf077ddc3e01291eea2d5c70c2b422b415d95645b9adcfd678cb1d63")
var feeAddress = common.HexToAddress("0x0000000000000000000000000000000000001010") var feeAddress = common.HexToAddress("0x0000000000000000000000000000000000001010")
var bigZero = big.NewInt(0)
/* /*
The State Transitioning Model The State Transitioning Model
...@@ -237,18 +238,20 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, failed bo ...@@ -237,18 +238,20 @@ 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
AddFeeTransferLog( if amount.Cmp(bigZero) > 0 {
st.state, AddFeeTransferLog(
st.state,
msg.From(),
st.evm.Coinbase, msg.From(),
st.evm.Coinbase,
amount,
input1, amount,
input2, input1,
output1.Sub(output1, amount), input2,
output2.Add(output2, amount), output1.Sub(output1, amount),
) output2.Add(output2, amount),
)
}
return ret, st.gasUsed(), vmerr != nil, err return ret, st.gasUsed(), vmerr != nil, err
} }
......
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