File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
besu/src/main/java/org/hyperledger/besu Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -863,7 +863,15 @@ private Map<String, JsonRpcMethod> jsonRpcMethods(
863863 dataDir ,
864864 besuController .getProtocolManager ().ethContext ().getEthPeers ());
865865 methods .putAll (besuController .getAdditionalJsonRpcMethods (jsonRpcApis ));
866- methods .putAll (rpcEndpointServiceImpl .getPluginMethods (jsonRpcConfiguration .getRpcApis ()));
866+
867+ var pluginMethods = rpcEndpointServiceImpl .getPluginMethods (jsonRpcConfiguration .getRpcApis ());
868+
869+ var overriddenMethods = methods .keySet ().stream ().filter (pluginMethods ::containsKey ).collect (Collectors .toList ());
870+ if (overriddenMethods .size () > 0 ){
871+ throw new RuntimeException ("You can not override built in methods " + overriddenMethods );
872+ }
873+
874+ methods .putAll (pluginMethods );
867875 return methods ;
868876 }
869877
You can’t perform that action at this time.
0 commit comments