Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/arbiter/arbiter/arbiter.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func (v *Arbiter) processArbiterSig() {
}

// get preOutput by tx.Inputs(idx)
idx := 1 - arbiterFeeVoutIndex
idx := 0
input := tx.TxIn[idx]
g.Log().Info(v.ctx, "input.PreviousOutPoint.Hash", input.PreviousOutPoint.Hash.String())
preTx, err := v.mempoolAPI.GetRawTransaction(input.PreviousOutPoint.Hash.String())
Expand Down
4 changes: 3 additions & 1 deletion docker/docker_run_arbiter_signer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ read -p "please input Arbiter address: " arbiter_address
read -p "please input Arbiter btc private key: " arbiter_btc_private_key
read -p "please input Arbiter esc private key: " arbiter_esc_private_key
read -p "please set keystore password: " keystore_password
read -p "for staging? true/false: " staging

docker run -d \
-e ARBITER_BTC_PRIVATE_KEY="$arbiter_btc_private_key" \
-e ARBITER_ESC_PRIVATE_KEY="$arbiter_esc_private_key" \
-e ARBITER_ADDRESS="$arbiter_address" \
-e ARBITER_KEYPASS="$keystore_password" \
mollkeith/arbiter-signer:v0.0.2
-e STAGING="$staging" \
mollkeith/arbiter-signer:v0.0.3
3 changes: 2 additions & 1 deletion docker/dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@ RUN wget https://download.bel2.org/loan-arbiter/deploy_loan_arbiter.sh
RUN chmod a+x deploy_loan_arbiter.sh
RUN echo $ARBITER_ADDRESS
RUN echo $ARBITER_KEYPASS
ENTRYPOINT ["/bin/bash", "-c", "./deploy_loan_arbiter.sh \"$ARBITER_ADDRESS\" \"$ARBITER_BTC_PRIVATE_KEY\" \"$ARBITER_ESC_PRIVATE_KEY\" \"$ARBITER_KEYPASS\"; tail -f /dev/null"]
RUN echo $STAGING
ENTRYPOINT ["/bin/bash", "-c", "./deploy_loan_arbiter.sh \"$ARBITER_ADDRESS\" \"$ARBITER_BTC_PRIVATE_KEY\" \"$ARBITER_ESC_PRIVATE_KEY\" \"$ARBITER_KEYPASS\" \"$STAGING\"; tail -f /dev/null"]
10 changes: 7 additions & 3 deletions docs/deploy_loan_arbiter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ check_status()
deploy_arbiter()
{
echo_info $SCRIPT_PATH
if [ $# -ne 4 ]; then
if [ $# -lt 4 ]; then
echo "Need to use deploy_loan_arbiter.sh [your_arbiter_esc_address] [hex_encoded_btc_private_key] [hex_encoded_esc_private_key] [your_keystore_password]"
exit 1
fi
Expand All @@ -76,7 +76,11 @@ deploy_arbiter()
cd $SCRIPT_PATH

#prepare config.yaml
wget -O conf.tgz https://download.bel2.org/loan-arbiter/loan-arbiter-v0.0.1/conf.tgz
if [ "$5" == "true" ]; then
wget -O conf.tgz https://download.bel2.org/loan-arbiter/loan-arbiter-v0.0.1/conf_staging.tgz
else
wget -O conf.tgz https://download.bel2.org/loan-arbiter/loan-arbiter-v0.0.1/conf_prod.tgz
fi
tar xf conf.tgz
#mv conf/config.yaml .
sed -i "s/0x0262aB0ED65373cC855C34529fDdeAa0e686D913/$1/g" config.yaml
Expand Down Expand Up @@ -123,4 +127,4 @@ deploy_arbiter()
}

SCRIPT_PATH=~/loan_arbiter
deploy_arbiter $1 $2 $3 $4
deploy_arbiter $1 $2 $3 $4 $5