mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-21 23:29:38 +00:00
smartcontract: ensure nil ParameterContext Item's script is marshallable
Ensure that ParameterContext's Item with nil script can be properly marshalled. Ref. https://github.com/neo-project/neo/pull/3198. Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
parent
1786136a23
commit
4b9024fa45
1 changed files with 4 additions and 0 deletions
|
@ -51,4 +51,8 @@ func TestContextItem_MarshalJSON(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
testserdes.MarshalUnmarshalJSON(t, expected, new(Item))
|
testserdes.MarshalUnmarshalJSON(t, expected, new(Item))
|
||||||
|
|
||||||
|
// Empty script.
|
||||||
|
expected.Script = nil
|
||||||
|
testserdes.MarshalUnmarshalJSON(t, expected, new(Item))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue