Merge remote-tracking branch 'upstream/defiant-dingirma' into fix/flat-schema
This commit is contained in:
commit
db32ad4f16
29 changed files with 2454 additions and 3157 deletions
1
test/integration/README.md
Normal file
1
test/integration/README.md
Normal file
|
|
@ -0,0 +1 @@
|
|||
### Early experiments in regtest
|
||||
35
test/integration/balance.sh
Normal file
35
test/integration/balance.sh
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
|
||||
PREFIX_W1='docker exec --user bitcoin bitcoin-server bitcoin-cli -rpcwallet=wallet1.dat -regtest '
|
||||
PREFIX_W2='docker exec --user bitcoin bitcoin-server bitcoin-cli -rpcwallet=wallet2.dat -regtest '
|
||||
|
||||
# Create address and generate mine blocks
|
||||
ADDRESS_1=`$PREFIX_W1 getnewaddress`
|
||||
ADDRESS_2=`$PREFIX_W2 getnewaddress`
|
||||
$PREFIX_W1 generatetoaddress 101 $ADDRESS_1 > /dev/null 2>&1
|
||||
|
||||
echo -e 'Wallet 1 balance'
|
||||
$PREFIX_W1 getwalletinfo | grep balance
|
||||
|
||||
echo -e '\nWallet 2 balance'
|
||||
$PREFIX_W2 getwalletinfo | grep balance
|
||||
|
||||
# Wallet one has one UTXO, so this also tests change
|
||||
echo -e '\n\nCreate send\n'
|
||||
$PREFIX_W1 sendtoaddress $ADDRESS_2 0.3 > /dev/null 2>&1
|
||||
|
||||
echo -e 'Wallet 1 balance'
|
||||
$PREFIX_W1 getwalletinfo | grep balance
|
||||
|
||||
echo -e '\nWallet 2 balance'
|
||||
$PREFIX_W2 getwalletinfo | grep balance
|
||||
|
||||
echo -e '\n\nMine one block \n'
|
||||
$PREFIX_W1 generatetoaddress 1 $ADDRESS_1 > /dev/null 2>&1
|
||||
|
||||
echo -e 'Wallet 1 balance'
|
||||
$PREFIX_W1 getwalletinfo | grep balance
|
||||
|
||||
echo -e '\nWallet 2 balance'
|
||||
$PREFIX_W2 getwalletinfo | grep balance
|
||||
|
||||
7
test/integration/bitcoind.sh
Normal file
7
test/integration/bitcoind.sh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
docker run --rm --name bitcoin-server -it ruimarinho/bitcoin-core \
|
||||
-regtest=1 \
|
||||
-wallet=wallet1.dat \
|
||||
-wallet=wallet2.dat
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue