vm: use new big.Int (de-)serialization routines

Also fix a test with CAT.
This commit is contained in:
Evgenii Stratonikov 2020-01-17 15:31:37 +03:00
parent f26bdae2c5
commit f0083b94c5
5 changed files with 6 additions and 12 deletions

View file

@ -5,8 +5,6 @@ import (
"errors"
"fmt"
"math/big"
"github.com/CityOfZion/neo-go/pkg/util"
)
// Stack implementation for the neo-go virtual machine. The stack implements
@ -83,7 +81,7 @@ func (e *Element) BigInt() *big.Int {
return big.NewInt(0)
default:
b := t.Value().([]uint8)
return new(big.Int).SetBytes(util.ArrayReverse(b))
return bytesToInt(b)
}
}