mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-11 22:43:47 +00:00
Merge branch 'bor' into span-sync
This commit is contained in:
commit
e55e19da72
1 changed files with 15 additions and 12 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue