xmr-btc-swap/swap/tests/bdk.sh
Byron Hambly cd3ba4905a
feat: add wallet database migration from older bdk
- upgrades to bdk 0.24 
- adds a regression test for opening older wallets 
- adds a migration for older wallets that encounter the ChecksumMismatch
  error 
2022-11-23 12:23:21 +02:00

28 lines
792 B
Bash
Executable File

#!/bin/bash
set -euxo pipefail
VERSION=0.11.1
mkdir bdk
stat ./target/debug/swap || exit 1
cp ./target/debug/swap bdk/swap-current
pushd bdk
echo "download swap $VERSION"
curl -L "https://github.com/comit-network/xmr-btc-swap/releases/download/${VERSION}/swap_${VERSION}_Linux_x86_64.tar" | tar xv
echo "create testnet wallet with $VERSION"
./swap --testnet --data-base-dir . --debug balance || exit 1
echo "check testnet wallet with this version"
./swap-current --testnet --data-base-dir . --debug balance || exit 1
echo "create mainnet wallet with $VERSION"
./swap --version || exit 1
./swap --data-base-dir . --debug balance || exit 1
echo "check mainnet wallet with this version"
./swap-current --version || exit 1
./swap-current --data-base-dir . --debug balance || exit 1
exit 0