From 1724d1666e17225af88afa974ace9032095bc5fa Mon Sep 17 00:00:00 2001 From: Jennifer Wang Date: Thu, 19 Jan 2023 11:02:09 -0500 Subject: [PATCH] fix: should not serve non v0 api in v1 --- node/rpc.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/node/rpc.go b/node/rpc.go index a96e6e3ac..1dab2a61f 100644 --- a/node/rpc.go +++ b/node/rpc.go @@ -94,8 +94,9 @@ func FullNodeHandler(a v1api.FullNode, permissioned bool, opts ...jsonrpc.Server fnapi = api.PermissionedFullAPI(fnapi) } + var v0 v0api.FullNode = &(struct{ v0api.FullNode }{&v0api.WrapperV1Full{FullNode: fnapi}}) serveRpc("/rpc/v1", fnapi) - serveRpc("/rpc/v0", &v0api.WrapperV1Full{FullNode: fnapi}) + serveRpc("/rpc/v0", v0) // Import handler handleImportFunc := handleImport(a.(*impl.FullNodeAPI))