forked from DeFiCh/ain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfeature_jellyfish_initial_funds.py
executable file
·32 lines (27 loc) · 1.14 KB
/
feature_jellyfish_initial_funds.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/usr/bin/env python3
# Copyright (c) 2014-2019 The Bitcoin Core developers
# Copyright (c) DeFi Blockchain Developers
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
"""Test the availability of required initial funds for jellyfish test containers.
"""
from test_framework.test_framework import DefiTestFramework
from test_framework.util import (
assert_equal,
)
class JellyfishInitialFundsTest (DefiTestFramework):
def set_test_params(self):
self.num_nodes = 1
self.setup_clean_chain = True
# pass -jellyfish_regtest=1 option to enable regtest params required for jellyfish test containers
self.extra_args = [['-jellyfish_regtest=1']]
def run_test(self):
node = self.nodes[0]
# generate one block
node.generate(1)
#check balances. should have 200000100 DFI immature balance
walletinfo = node.getwalletinfo()
assert_equal(walletinfo['immature_balance'], 200000100)
assert_equal(walletinfo['balance'], 0)
if __name__ == '__main__':
JellyfishInitialFundsTest ().main ()