Browse Source

Merge pull request #95 from artemii235/etomic

#84 Remove failing checks when ETOMIC coins orders are getting placed.
pass-iguana-arg
Artem Pikulin 7 years ago
committed by GitHub
parent
commit
4e81669d84
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      .travis.yml
  2. 20
      Jenkinsfile
  3. 2
      iguana/exchanges/LP_ordermatch.c
  4. 5
      travis_cmake_linux.sh
  5. 6
      travis_cmake_mac.sh

9
.travis.yml

@ -12,15 +12,20 @@ matrix:
before_install:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && sudo apt-get update && sudo apt-get install -y g++-7; fi
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then chmod +x travis_cmake_linux.sh && ./travis_cmake_linux.sh; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then chmod +x travis_cmake_mac.sh && ./travis_cmake_mac.sh; fi
- git submodule update --init --recursive
script:
- export VERSION=`echo "$(git tag -l --points-at HEAD)"`
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then export THREAD_COUNT=`echo "$(nproc --all)"`; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export THREAD_COUNT=`echo "$(sysctl -n hw.physicalcpu)"`; fi
- mkdir build && cd build
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then cmake -DMM_VERSION="$VERSION" -DCMAKE_C_COMPILER=/usr/bin/gcc-7 -DCMAKE_CXX_COMPILER=/usr/bin/g++-7 ..; fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then cmake -DMM_VERSION="$VERSION" ..; fi
- cmake --build . --target marketmaker-mainnet
- cmake --build . --target marketmaker-testnet
- echo "cmake --build . --target marketmaker-mainnet -j $THREAD_COUNT"
- cmake --build . --target marketmaker-mainnet -j $THREAD_COUNT
- cmake --build . --target marketmaker-testnet -j $THREAD_COUNT
cache:
apt: true

20
Jenkinsfile

@ -14,7 +14,7 @@ rm -rf build
mkdir build
cd build
cmake ..
cmake --build . --target marketmaker-testnet
cmake --build . --target marketmaker-testnet -j 4
cd ../
docker-compose build'''
}
@ -34,24 +34,6 @@ docker-compose down'''
./start_BEER_OTHER_trade_inverted.sh ETH
timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f clientnode)
timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f seednode)
docker-compose down'''
}
}
stage('Trade BEER/ETOMIC') {
steps {
sh '''docker-compose up -d
./start_BEER_OTHER_trade.sh ETOMIC
timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f clientnode)
timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f seednode)
docker-compose down'''
}
}
stage('Trade ETOMIC/BEER') {
steps {
sh '''docker-compose up -d
./start_BEER_OTHER_trade_inverted.sh ETOMIC
timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f clientnode)
timeout 600 grep -q "SWAP completed" <(COMPOSE_HTTP_TIMEOUT=600 docker-compose logs -f seednode)
docker-compose down'''
}
}

2
iguana/exchanges/LP_ordermatch.c

@ -1789,7 +1789,7 @@ char *LP_autobuy(void *ctx,int32_t fomoflag,char *myipaddr,int32_t mypubsock,cha
destsatoshis = autxo->swap_satoshis;
printf("second path dest %.8f from %.8f\n",dstr(destsatoshis),dstr(autxo->swap_satoshis));
}
if ( destsatoshis < (autxo->payment.value / LP_MINCLIENTVOL) || autxo->payment.value < desttxfee*LP_MINSIZE_TXFEEMULT )
if ( relcoin->etomic[0] == 0 && (destsatoshis < (autxo->payment.value / LP_MINCLIENTVOL) || autxo->payment.value < desttxfee*LP_MINSIZE_TXFEEMULT ))
{
printf("destsatoshis %.8f vs utxo %.8f this would have triggered an quote error -13\n",dstr(destsatoshis),dstr(autxo->payment.value));
return(clonestr("{\"error\":\"cant find a deposit that is close enough in size. make another deposit that is a bit larger than what you want to trade\"}"));

5
travis_cmake_linux.sh

@ -0,0 +1,5 @@
#!/bin/bash
sudo rm -rf /usr/local/cmake-3.9.2 && sudo rm -rf /usr/local/cmake
wget https://cmake.org/files/v3.12/cmake-3.12.0-rc2-Linux-x86_64.sh
chmod +x cmake-3.12.0-rc2-Linux-x86_64.sh
sudo ./cmake-3.12.0-rc2-Linux-x86_64.sh --skip-license --exclude-subdir --prefix=/usr/local

6
travis_cmake_mac.sh

@ -0,0 +1,6 @@
#!/bin/bash
brew uninstall cmake --force
wget https://cmake.org/files/v3.12/cmake-3.12.0-rc2-Darwin-x86_64.tar.gz
tar -xzf cmake-3.12.0-rc2-Darwin-x86_64.tar.gz
cp -r cmake-3.12.0-rc2-Darwin-x86_64/CMake.app/Contents/bin/* /usr/local/bin/
cp -r cmake-3.12.0-rc2-Darwin-x86_64/CMake.app/Contents/share/* /usr/local/share/
Loading…
Cancel
Save