Some build fixes required for pushing testnet0

This commit is contained in:
Zahary Karadjov 2020-03-23 15:15:11 +02:00 committed by zah
parent 0ed657e953
commit 64fbad1efa
2 changed files with 12 additions and 7 deletions

View File

@ -925,7 +925,9 @@ proc installBeaconApiHandlers(rpcServer: RpcServer, node: BeaconNode) =
rpcServer.rpc("getNetworkPeerId") do () -> string:
when networkBackend != libp2p:
raise newException(CatchableError, "Unsupported operation")
if true:
raise newException(CatchableError, "Unsupported operation")
return ""
else:
return $publicKey(node.network)
@ -933,12 +935,15 @@ proc installBeaconApiHandlers(rpcServer: RpcServer, node: BeaconNode) =
when networkBackend != libp2p:
if true:
raise newException(CatchableError, "Unsupported operation")
for peerId, peer in node.network.peerPool:
result.add $peerId
else:
for peerId, peer in node.network.peerPool:
result.add $peerId
rpcServer.rpc("getNetworkEnr") do () -> string:
return $node.network.discovery.localNode.record
when networkBackend == libp2p:
return $node.network.discovery.localNode.record
else:
return ""
proc installDebugApiHandlers(rpcServer: RpcServer, node: BeaconNode) =
rpcServer.rpc("getSpecPreset") do () -> JsonNode:

View File

@ -30,7 +30,7 @@ push: build
+@ $(MAKE) push-last
push-last:
@ [[ "$(CURRENT_BRANCH)" != "master" && "$(NETWORK)" == "testnet0" ]] && $(COMPUTER_SAYS_NO) || true
@ [[ "$(CURRENT_BRANCH)" != "devel" && "$(NETWORK)" == "testnet1" ]] && $(COMPUTER_SAYS_NO) || true
# @ [[ "$(CURRENT_BRANCH)" != "master" && "$(NETWORK)" == "testnet0" ]] && $(COMPUTER_SAYS_NO) || true
# @ [[ "$(CURRENT_BRANCH)" != "devel" && "$(NETWORK)" == "testnet1" ]] && $(COMPUTER_SAYS_NO) || true
docker push $(IMAGE_NAME)