mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-06 09:55:09 +00:00
stackitem: reusable serialization context
We serialize items a lot and this allows to avoid a number of allocations.
This commit is contained in:
parent
3d4076ca36
commit
c3d989ebda
13 changed files with 111 additions and 42 deletions
|
@ -61,7 +61,7 @@ func Notify(ic *interop.Context) error {
|
|||
// But it has to be serializable, otherwise we either have some broken
|
||||
// (recursive) structure inside or an interop item that can't be used
|
||||
// outside of the interop subsystem anyway.
|
||||
bytes, err := stackitem.Serialize(elem.Item())
|
||||
bytes, err := ic.DAO.GetItemCtx().Serialize(elem.Item(), false)
|
||||
if err != nil {
|
||||
return fmt.Errorf("bad notification: %w", err)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue