Mine more blocks to ensure a mature balance

This commit is contained in:
Jonathan "Duke" Leto
2018-08-09 08:53:24 +02:00
parent 77373514f5
commit 1399f859e0

View File

@@ -53,12 +53,20 @@ class CryptoConditionsTest (BitcoinTestFramework):
def run_test (self):
print("Mining blocks...")
rpc = self.nodes[0]
rpc.generate(1)
# utxos from block 1 become mature in block 101
rpc.generate(101)
self.sync_all()
# this corresponds to -pubkey above
print("Importing privkey")
rpc.importprivkey(self.privkey)
result = rpc.getwalletinfo()
# basic sanity tests
assert_equal(result['txcount'], 101)
assert_greater_than(result['balance'], 0.0)
# Begin actual CC tests
# Faucet tests
@@ -72,7 +80,7 @@ class CryptoConditionsTest (BitcoinTestFramework):
assert_equal(result['result'], 'success')
# fails
#result = rpc.faucetfund(1)
#result = rpc.faucetfund(-1.0)
# Dice tests
dice = rpc.diceaddress()