Merge branch 'bor' into span-sync

This commit is contained in:
Jaynti Kanani 2019-10-25 15:16:48 +05:30
commit e55e19da72
No known key found for this signature in database
GPG key ID: 4396982C976BAE5E

View file

@ -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(
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,