mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 03:58:06 +00:00
core: fix encoding and decoding for notification event
This commit is contained in:
parent
ec17654986
commit
c7ac4b6dff
2 changed files with 9 additions and 1 deletions
|
@ -27,7 +27,7 @@ import (
|
|||
// Tuning parameters.
|
||||
const (
|
||||
headerBatchCount = 2000
|
||||
version = "0.0.2"
|
||||
version = "0.0.3"
|
||||
|
||||
// This one comes from C# code and it's different from the constant used
|
||||
// when creating an asset with Neo.Asset.Create interop call. It looks
|
||||
|
|
|
@ -39,11 +39,19 @@ func (ne *NotificationEvent) DecodeBinary(r *io.BinReader) {
|
|||
// EncodeBinary implements the Serializable interface.
|
||||
func (aer *AppExecResult) EncodeBinary(w *io.BinWriter) {
|
||||
w.WriteBytes(aer.TxHash[:])
|
||||
w.WriteLE(aer.Trigger)
|
||||
w.WriteString(aer.VMState)
|
||||
w.WriteLE(aer.GasConsumed)
|
||||
w.WriteString(aer.Stack)
|
||||
w.WriteArray(aer.Events)
|
||||
}
|
||||
|
||||
// DecodeBinary implements the Serializable interface.
|
||||
func (aer *AppExecResult) DecodeBinary(r *io.BinReader) {
|
||||
r.ReadBytes(aer.TxHash[:])
|
||||
r.ReadLE(&aer.Trigger)
|
||||
aer.VMState = r.ReadString()
|
||||
r.ReadLE(&aer.GasConsumed)
|
||||
aer.Stack = r.ReadString()
|
||||
r.ReadArray(&aer.Events)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue