2016-03-08 16:27:34 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# This needs the buyer node to be running first.
|
|
|
|
|
|
|
|
if [ ! -e ./gradlew ]; then
|
|
|
|
echo "Run from the root directory please"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2016-03-09 13:38:03 +00:00
|
|
|
bin="build/install/r3prototyping/bin/get-rate-fix"
|
|
|
|
|
|
|
|
if [ ! -e $bin ]; then
|
2016-03-08 16:27:34 +00:00
|
|
|
./gradlew installDist
|
|
|
|
fi
|
|
|
|
|
2016-07-12 15:10:07 +00:00
|
|
|
if [ ! -e build/trader-demo/buyer/identity-public ]; then
|
2016-03-08 16:27:34 +00:00
|
|
|
echo "You must run scripts/trade-demo.sh buyer before running this script (and keep it running)"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Upload the rates to the buyer node
|
|
|
|
curl -F rates=@scripts/example.rates.txt http://localhost:31338/upload/interest-rates
|
|
|
|
|
2016-08-23 09:47:51 +00:00
|
|
|
$bin --network-address=localhost:31300 --directory=build/trader-demo/rates-fix --network-map=localhost:31337 --network-map-identity-file=build/trader-demo/buyer/identity-public
|