Merge pull request #399 from jpmorganchase/private_state

validate input before calling evm
This commit is contained in:
Samer Falah 2018-06-11 14:12:52 -04:00 committed by Zekun Shi
parent be8f2f8426
commit cfa9c96b5f
1 changed files with 4 additions and 0 deletions

View File

@ -253,6 +253,10 @@ func (st *StateTransition) TransitionDb() (ret []byte, usedGas uint64, failed bo
if len(data) == 0 {
return nil, new(big.Int), new(big.Int), false, nil
}
//if input is empty for the smart contract call, return
if len(data) == 0 {
return nil, new(big.Int), new(big.Int), false, nil
}
ret, st.gas, vmerr = evm.Call(sender, to, data, st.gas, st.value)
}
if vmerr != nil {