compiler: emit integers correctly
A while ago VM serialization format for Integer items was changed but compiler continued to emit Integers in old format. This commit changes compiler behaviour to be compatible with VM.
This commit is contained in:
parent
f15ceff592
commit
d190b3a2e0
2 changed files with 28 additions and 2 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
"math/big"
|
||||
|
||||
"github.com/CityOfZion/neo-go/pkg/io"
|
||||
"github.com/CityOfZion/neo-go/pkg/util"
|
||||
"github.com/CityOfZion/neo-go/pkg/vm"
|
||||
"github.com/CityOfZion/neo-go/pkg/vm/opcode"
|
||||
)
|
||||
|
||||
|
@ -47,7 +47,7 @@ func emitInt(w *io.BinWriter, i int64) {
|
|||
}
|
||||
|
||||
bInt := big.NewInt(i)
|
||||
val := util.ArrayReverse(bInt.Bytes())
|
||||
val := vm.IntToBytes(bInt)
|
||||
emitBytes(w, val)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue