Mine more blocks to ensure a mature balance
This commit is contained in:
@@ -53,12 +53,20 @@ class CryptoConditionsTest (BitcoinTestFramework):
|
|||||||
def run_test (self):
|
def run_test (self):
|
||||||
print("Mining blocks...")
|
print("Mining blocks...")
|
||||||
rpc = self.nodes[0]
|
rpc = self.nodes[0]
|
||||||
rpc.generate(1)
|
|
||||||
|
# utxos from block 1 become mature in block 101
|
||||||
|
rpc.generate(101)
|
||||||
self.sync_all()
|
self.sync_all()
|
||||||
|
|
||||||
# this corresponds to -pubkey above
|
# this corresponds to -pubkey above
|
||||||
print("Importing privkey")
|
print("Importing privkey")
|
||||||
rpc.importprivkey(self.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
|
# Begin actual CC tests
|
||||||
|
|
||||||
# Faucet tests
|
# Faucet tests
|
||||||
@@ -72,7 +80,7 @@ class CryptoConditionsTest (BitcoinTestFramework):
|
|||||||
assert_equal(result['result'], 'success')
|
assert_equal(result['result'], 'success')
|
||||||
|
|
||||||
# fails
|
# fails
|
||||||
#result = rpc.faucetfund(1)
|
#result = rpc.faucetfund(-1.0)
|
||||||
|
|
||||||
# Dice tests
|
# Dice tests
|
||||||
dice = rpc.diceaddress()
|
dice = rpc.diceaddress()
|
||||||
|
|||||||
Reference in New Issue
Block a user