Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

FIX: Neo.Network.RPC.Utility.RuleExpressionFromJson #791

@Devel484

Description

@Devel484

Describe the bug
Fetching a block on testnet causes a crash in RPC Client.

Neo.Network.RPC.Models.RpcTransaction
Unhandled exception. System.NullReferenceException: Object reference not set to an instance of an object.
   at Neo.Network.RPC.Utility.RuleExpressionFromJson(JObject json, ProtocolSettings protocolSettings)
   at Neo.Network.RPC.Utility.RuleFromJson(JObject json, ProtocolSettings protocolSettings)
   at Neo.Network.RPC.Utility.<>c__DisplayClass11_0.<SignerFromJson>b__0(JToken p)
   at System.Linq.Enumerable.SelectIListIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Neo.Network.RPC.Utility.SignerFromJson(JObject json, ProtocolSettings protocolSettings)
   at Neo.Network.RPC.Utility.<>c__DisplayClass9_0.<TransactionFromJson>b__0(JToken p)
   at System.Linq.Enumerable.SelectIListIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Neo.Network.RPC.Utility.TransactionFromJson(JObject json, ProtocolSettings protocolSettings)
   at Neo.Network.RPC.Utility.<>c__DisplayClass6_0.<BlockFromJson>b__0(JToken p)
   at System.Linq.Enumerable.SelectIListIterator`2.ToArray()
   at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
   at Neo.Network.RPC.Utility.BlockFromJson(JObject json, ProtocolSettings protocolSettings)
   at Neo.Network.RPC.Models.RpcBlock.FromJson(JObject json, ProtocolSettings protocolSettings)
   at Neo.Network.RPC.RpcClient.GetBlockAsync(String hashOrIndex)

To Reproduce
Steps to reproduce the behavior:

  1. Use N3 RPC 3.5.0
  2. Use any N3 Node(e.g. http://seed1t5.neo.org:20332)
  3. Query block 1048534
var block = await rpc.GetBlockAsync("1048534");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions