Skip to content

Commit

Permalink
smartcontract: ensure nil ParameterContext Item's script is marshallable
Browse files Browse the repository at this point in the history
Ensure that ParameterContext's Item with nil script can be properly
marshalled. Ref. neo-project/neo#3198.

Signed-off-by: Anna Shaleva <[email protected]>
  • Loading branch information
AnnaShaleva committed Apr 18, 2024
1 parent 1786136 commit 4b9024f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/smartcontract/context/item_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,4 +51,8 @@ func TestContextItem_MarshalJSON(t *testing.T) {
}

testserdes.MarshalUnmarshalJSON(t, expected, new(Item))

// Empty script.
expected.Script = nil
testserdes.MarshalUnmarshalJSON(t, expected, new(Item))
}

0 comments on commit 4b9024f

Please sign in to comment.