From 5c2b39bac44bae575ebe2cbc4df230111631cca2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vitor=20Naz=C3=A1rio=20Coelho?= Date: Tue, 15 Jan 2019 13:30:10 -0200 Subject: [PATCH] Policy filter GetRelayResult message (#543) * Policy filter GetRelayResult message * adding fixed numbering for return codes * Removed enum fixed values --- neo/Network/RPC/RpcServer.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neo/Network/RPC/RpcServer.cs b/neo/Network/RPC/RpcServer.cs index 0f22ad4851..5a12f190ba 100644 --- a/neo/Network/RPC/RpcServer.cs +++ b/neo/Network/RPC/RpcServer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.IO.Compression; @@ -127,8 +127,10 @@ private static JObject GetRelayResult(RelayResultReason reason) throw new RpcException(-503, "The block cannot be validated."); case RelayResultReason.Invalid: throw new RpcException(-504, "Block or transaction validation failed."); + case RelayResultReason.PolicyFail: + throw new RpcException(-505, "One of the Policy filters failed."); default: - throw new RpcException(-500, "Unkown error."); + throw new RpcException(-500, "Unknown error."); } }