core/vm: similar logic for push

This commit is contained in:
Marius van der Wijden 2024-11-07 06:46:07 +01:00
parent 171ae812e6
commit 891db42ae1
1 changed files with 2 additions and 3 deletions

View File

@ -54,10 +54,9 @@ func (st *Stack) Data() []uint256.Int {
func (st *Stack) push(d uint256.Int) {
// NOTE push limit (1024) is checked in baseCheck
if st.size == len(st.data) {
st.data = append(st.data, d)
} else {
st.data[st.size] = d
st.data = append(st.data, uint256.Int{})
}
st.data[st.size] = d
st.size++
}