mirror of
https://github.com/EvernodeXRPL/hpcore.git
synced 2026-04-29 15:37:59 +00:00
Contract id mismatch log message. (#227)
* Added contract id mismatch log. * Added individual docker image run script.
This commit is contained in:
@@ -104,7 +104,10 @@ namespace p2p
|
||||
|
||||
// Check whether contract ids match.
|
||||
if (chall.contract_id != conf::cfg.contract.id)
|
||||
{
|
||||
LOG_ERROR << "Contract id mismatch. Dropping connection " << session.display_name();
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Sending the challenge response to the sender.
|
||||
flatbuffers::FlatBufferBuilder fbuf(1024);
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Runs the specified node contract with hpcore docker image.
|
||||
# Runs the specified node of the local cluster with hpcore docker image. (created via cluster-create.sh)
|
||||
# This script assumes you already have the hpcore docker image and 'hpnet' virtual docker network.
|
||||
# Usage (to run the node no. 1): ./start.sh 1
|
||||
# Usage (to run the node no. 1): ./cluster-start.sh 1
|
||||
|
||||
# Validate the node count arg.
|
||||
if [ -n "$1" ] && [ "$1" -eq "$1" ] 2>/dev/null; then
|
||||
|
||||
28
test/local-cluster/rundir.sh
Executable file
28
test/local-cluster/rundir.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Runs the specified contract directory with hpcore docker image.
|
||||
# This script assumes you already have the hpcore docker image and 'hpnet' virtual docker network.
|
||||
# Usage: ./rundir.sh 1
|
||||
|
||||
# Validate the node count arg.
|
||||
if [ -z "$1" ]; then
|
||||
echo "Error: Please provide contract directory to run."
|
||||
exit 1
|
||||
else
|
||||
echo "Starting docker container..."
|
||||
fi
|
||||
|
||||
dir=$(realpath $1)
|
||||
dirname=$(basename $dir)
|
||||
n=$1
|
||||
|
||||
let pubport=8080
|
||||
|
||||
# Mount the directory $dir into hpcore docker container and run.
|
||||
# We specify --network=hpnet so all nodes will communicate via 'hpnet' docker virtual network.
|
||||
# We specify --name for each node so it will be the virtual dns name for each node.
|
||||
docker run --rm -t -i --network=hpnet --name=hp_$dirname \
|
||||
-p ${pubport}:${pubport} \
|
||||
--device /dev/fuse --cap-add SYS_ADMIN --security-opt apparmor:unconfined \
|
||||
--mount type=bind,source=$dir,target=/contract \
|
||||
hpcore:latest run /contract
|
||||
Reference in New Issue
Block a user