コード例 #1
0
def test(testfilter):
    global datadir1
    global datadir2
    global datadir3

    _lib.StartTestGroup("Manage nodes list")

    _lib.CleanTestFolders()
    datadir1 = _lib.CreateTestFolder('_1_')
    datadir2 = _lib.CreateTestFolder('_2_')

    _lib.StartTestGroup("Create blockchain and run node 1")
    r = blocksbasic.PrepareBlockchain(datadir1, '30000')
    address = r[0]

    startnode.StartNode(datadir1, address, '30000', "Server 1")

    address2 = initblockchain.ImportBockchain(datadir2, "localhost", '30000')

    #RemoveAllNodes(datadir1)
    nodes = GetNodes(datadir1)
    _lib.FatalAssert(len(nodes) == 0, "Should be 0 nodes in output")

    AddNode(datadir1, "localhost", '30001')

    nodes = GetNodes(datadir1)
    _lib.FatalAssert(len(nodes) == 1, "Should be 1 nodes in output")

    RemoveNode(datadir1, "localhost", '30001')

    nodes = GetNodes(datadir1)
    _lib.FatalAssert(len(nodes) == 0, "Should be 0 nodes in output")

    startnode.StartNode(datadir2, address2, '30001', "Server 2")

    #RemoveAllNodes(datadir2)

    #AddNode(datadir1, "localhost",'30001')

    nodes = GetNodes(datadir1)
    _lib.FatalAssert(len(nodes) == 1, "Should be 1 nodes in output")

    startnode.StopNode(datadir2, "Server 2")

    startnode.StartNode(datadir2, address2, '30001', "Server 2")

    nodes = GetNodes(datadir1)

    _lib.FatalAssert(len(nodes) == 1, "Should be 1 nodes in output")
    _lib.FatalAssert(
        nodes.keys()[0] == "localhost:30001"
        or nodes.keys()[0] == "127.0.0.1:30001", "Wrong node in the list")

    # check transactions work fine between nodes
    _transfers.Send(datadir1, address, address2, '3')

    txlist = transactions.GetUnapprovedTransactions(datadir1)

    _lib.FatalAssert(len(txlist) == 1, "Should be 1 unapproved transaction")

    blocks = _blocks.WaitBlocks(datadir1, 2)

    # send another 2 TX to make a block
    tx = _transfers.Send(datadir1, address, address2, '0.01')

    tx = _transfers.Send(datadir1, address, address2, '0.01')

    blocks = _blocks.WaitBlocks(datadir1, 3)
    time.sleep(2)

    tx = txid1 = _transfers.Send(datadir1, address, address2, '1')
    time.sleep(1)

    txlist = transactions.GetUnapprovedTransactions(datadir1)

    _lib.FatalAssert(
        len(txlist) == 1,
        "Should be 1 unapproved transaction. Got " + str(len(txlist)))

    time.sleep(3)
    # and now get transactions from second node
    txlist = _transfers.WaitUnapprovedTransactions(datadir2, 1)

    _lib.FatalAssert(
        len(txlist) == 1,
        "Should be 1 unapproved transaction on second node. Got " +
        str(len(txlist)) + " " + str(txlist))
    #print txid1
    #print txlist
    if txid1 not in txlist.keys():
        _lib.Fatal(
            "Transaction 1 is not in the list of transactions on second node")

    # start one more node
    datadir3 = _lib.CreateTestFolder('_3_')
    address3 = initblockchain.ImportBockchain(datadir3, "localhost", '30000')

    startnode.StartNode(datadir3, address3, '30002', "Server 3")

    #RemoveAllNodes(datadir3)

    #AddNode(datadir3, "localhost",'30001')

    time.sleep(2)  # wait while nodes exchange addresses

    nodes = GetNodes(datadir1)
    _lib.FatalAssert(len(nodes) == 2, "Should be 2 nodes in output of 1")

    nodes = GetNodes(datadir2)

    _lib.FatalAssert(len(nodes) == 2, "Should be 2 nodes in output of 2")

    nodes = GetNodes(datadir3)
    _lib.FatalAssert(len(nodes) == 2, "Should be 2 nodes in output of 3")

    txid1 = _transfers.Send(datadir1, address, address3, '4')

    # unapproved TX is pulled from node 1 on start
    txlist3 = transactions.GetUnapprovedTransactions(datadir3)

    _lib.FatalAssert(
        len(txlist3) == 1, "Should be 1 unapproved transactions on 3")

    time.sleep(3)  # we need to give a chance to sync all

    txlist1 = transactions.GetUnapprovedTransactions(datadir1)
    txlist2 = transactions.GetUnapprovedTransactions(datadir2)

    _lib.FatalAssert(
        len(txlist1) == 2, "Should be 2 unapproved transactions on 1")
    _lib.FatalAssert(
        len(txlist2) == 2, "Should be 2 unapproved transactions on 2")

    if txid1 not in txlist1.keys():
        _lib.Fatal(
            "Transaction 2 is not in the list of transactions on node 1")

    if txid1 not in txlist2.keys():
        _lib.Fatal(
            "Transaction 2 is not in the list of transactions on node 2")

    # send one more TX. Block must be created
    txid3 = _transfers.Send(datadir1, address, address2, '1')

    blocks = _blocks.WaitBlocks(datadir3, 4)
    blocks = _blocks.WaitBlocks(datadir2, 4)
    blocks = _blocks.WaitBlocks(datadir1, 4)
    time.sleep(1)

    transactions.GetUnapprovedTransactionsEmpty(datadir1)
    transactions.GetUnapprovedTransactionsEmpty(datadir2)
    transactions.GetUnapprovedTransactionsEmpty(datadir3)

    # check if a block is present on all nodes. it must be 2 block on every node
    blockshashes = _blocks.GetBlocks(datadir1)

    _lib.FatalAssert(
        len(blockshashes) == 4, "Should be 4 blocks in blockchain on 1")

    blockshashes = _blocks.GetBlocks(datadir2)
    _lib.FatalAssert(
        len(blockshashes) == 4, "Should be 4 blocks in blockchain on 2")

    blockshashes = _blocks.GetBlocks(datadir3)
    _lib.FatalAssert(
        len(blockshashes) == 4, "Should be 4 blocks in blockchain on 3")

    startnode.StopNode(datadir1, "Server 1")
    startnode.StopNode(datadir2, "Server 2")
    startnode.StopNode(datadir3, "Server 3")

    #_lib.RemoveTestFolder(datadir1)
    #_lib.RemoveTestFolder(datadir2)

    datadir1 = ""
    datadir2 = ""
    datadir3 = ""

    _lib.EndTestGroupSuccess()
コード例 #2
0
ファイル: consensus.py プロジェクト: diegslva/oursql
def test(testfilter):
    global datadirs
    _lib.CleanTestFolders()
    #return _complex.Make5BlocksBC()
    #return _complex.PrepareNodes()

    dirs = _complex.Copy6Nodes()
    
    nodes = []
    
    i = 1
    for d in dirs:
        #get address in wallets in this dir 
        balances = _transfers.GetGroupBalance(d)
        address = balances.keys()[0]
        
        port = str(30000 + i )
        
        nodes.append({'index':i - 1, 'port':port, 'datadir':d,'address':address,"title":"Server "+str(i)})
        
        #_transfers.ReindexUTXO(d)
        #txlist = transactions.GetUnapprovedTransactions(d)
        #print txlist
        #start this node 
        #print os.path.basename(d)
        startnode.StartNodeConfig(d)
        
        i = i + 1
        datadirs.append(d)
        
    #check nodes on each node is correct 
    for node in nodes:
        #print os.path.basename(node['datadir'])
        nodeslist = managenodes.GetNodes(node['datadir'])
        
        _lib.FatalAssert(len(nodeslist) == 2,"Should be 2 nodes on "+node["title"])
        
        if node['index'] == 0:
            _lib.FatalAssert("localhost:30005" in nodeslist,"Node 6 should be on the node 0")
            _lib.FatalAssert("localhost:30004" in nodeslist,"Node 5 should be on the node 0")
        if node['index'] == 1:
            _lib.FatalAssert("localhost:30002" in nodeslist,"Node 2 should be on the node 1")
            _lib.FatalAssert("localhost:30003" in nodeslist,"Node 3 should be on the node 1")
    #raise ValueError('Stop')
    # test blocks branches
    _lib.StartTestGroup("Check blockchain before updates")
    blocks1 = _blocks.GetBlocks(nodes[0]["datadir"])
    blocks2 = _blocks.GetBlocks(nodes[1]["datadir"])
    
    _lib.FatalAssert(len(blocks1) == 9,"First branch should have 9 blocks")
    _lib.FatalAssert(len(blocks2) == 8,"Second branch should have 8 blocks")
    
    _lib.FatalAssert(blocks1[2] == blocks2[1],"7 block must be same for both")
    _lib.FatalAssert(blocks1[1] != blocks2[0],"8 block must be different")
    
    _lib.StartTestGroup("Connect subnetworks")
    managenodes.AddNode(nodes[0]["datadir"],"localhost",'30001')
   
    # wait whle blocks are exachanged
    _blocks.WaitBlocks(nodes[1]["datadir"],9)
    
    # get unapproved transactions (after block cancel)
    txlist = _transfers.WaitUnapprovedTransactions(nodes[1]["datadir"], 7)
    
    _lib.FatalAssert(len(txlist) == 7,"SHould be 7 unapproved TXs")
    
    #send another 2 TXs to have 9 required TXs
    balances = _transfers.GetGroupBalance(nodes[1]["datadir"])
    
    mainbalance = _transfers.GetGroupBalance(nodes[0]["datadir"])

    addr1 = balances.keys()[0]
    amount = "%.8f" % round(balances[addr1][0]/5,8)
    
    _transfers.Send(nodes[1]["datadir"],addr1,mainbalance.keys()[0],amount)
    _transfers.Send(nodes[1]["datadir"],addr1,mainbalance.keys()[0],amount)
    
    # wait while new block created and posted to all other
    b1 = _blocks.WaitBlocks(nodes[1]["datadir"],10)
    b2 = _blocks.WaitBlocks(nodes[0]["datadir"],10)
    
    _lib.StartTestGroup("Check blockchain after updates")
    blocks2_0 = _blocks.GetBlocks(nodes[0]["datadir"])

    _lib.FatalAssert(len(blocks2_0) == 10,"10 block must be on node 0")
    _lib.FatalAssert(blocks2_0[1] == blocks1[0],"9 block must be same for both")
    
    blocks2_1 = _blocks.GetBlocks(nodes[1]["datadir"])
    _lib.FatalAssert(len(blocks2_1) == 10,"10 block must be on node 1")
    _lib.FatalAssert(blocks2_1[1] == blocks1[0],"9 block must be same for both")
        
    _lib.StartTestGroup("Node 2 "+os.path.basename(nodes[2]["datadir"]))
    _blocks.WaitBlocks(nodes[2]["datadir"],10)
    
    blocks2_2 = _blocks.GetBlocks(nodes[2]["datadir"])
    
    _lib.FatalAssert(len(blocks2_2) == 10,"10 block must be on node 2")
    _lib.FatalAssert(blocks2_2[1] == blocks2_1[1],"2-nd from top blocks on 2 must be same as on 1")
    
    _lib.StartTestGroup("Node 3 "+os.path.basename(nodes[3]["datadir"]))
    
    _blocks.WaitBlocks(nodes[3]["datadir"],10)
    blocks2_3 = _blocks.GetBlocks(nodes[3]["datadir"])
    
    _lib.FatalAssert(len(blocks2_3) == 10,"10 block must be on node 3")
    _lib.FatalAssert(blocks2_3[1] == blocks2_1[1],"2-nd from top blocks on  3 must be same as on 1")
    
    _lib.StartTestGroup("Node 4 "+os.path.basename(nodes[4]["datadir"]))
    
    _blocks.WaitBlocks(nodes[4]["datadir"],10)
    blocks2_4 = _blocks.GetBlocks(nodes[4]["datadir"])
    
    _lib.FatalAssert(len(blocks2_4) == 10,"10 block must be on node 4")
    _lib.FatalAssert(blocks2_4[1] == blocks2_1[1],"2-nd from top blocks on 4 must be same as on 1")
    
    _lib.StartTestGroup("Node 5 "+os.path.basename(nodes[5]["datadir"]))
    
    _blocks.WaitBlocks(nodes[5]["datadir"],10)
    blocks2_5 = _blocks.GetBlocks(nodes[5]["datadir"])
    
    _lib.FatalAssert(len(blocks2_5) == 10,"10 block must be on node 5")
    _lib.FatalAssert(blocks2_5[1] == blocks2_1[1],"2-nd from top blocks on 5 must be same as on 1")
    
    _lib.StartTestGroup("Final checks")
    # should be empty list of transactions now
    transactions.GetUnapprovedTransactionsEmpty(nodes[1]["datadir"])
    
    for node in nodes:
        startnode.StopNode(node['datadir'])
        datadirs[node['index']] = ""
    
    #_lib.RemoveTestFolder(datadir)
    _lib.EndTestGroupSuccess()
コード例 #3
0
def test(testfilter):
    global datadir1
    global datadir2

    _lib.StartTestGroup(
        "Test data exahcnge with non-public address node and long minting")

    _lib.CleanTestFolders()

    datadir = _lib.CreateTestFolder()

    address1_2 = transactions.CreateWallet(datadir)
    address1_3 = transactions.CreateWallet(datadir)

    _lib.CopyTestConsensusConfig(datadir, "hardpow", address1_3)

    address1_1 = startnode.InitBockchain(datadir)
    _complex.AddProxyToConfig(datadir, "localhost:40041")
    _complex.AddInternalKeyToConfig(datadir,
                                    address1_2)  # init internal signing

    startnode.StartNode(datadir, address1_1, '30000')
    datadir1 = datadir

    tx = _transfers.Send(datadir, address1_1, address1_2, 2)

    # node 1 should start minting now

    d = pullsync.StartNodeAndImport('30001', '30000', "Server 2", 0, "_2_",
                                    "xxx.com")
    datadir2 = d[0]
    address2 = d[1]

    # list of transactions must be emoty on 2-nd node
    transactions.GetUnapprovedTransactionsEmpty(datadir2)
    time.sleep(1)
    transactions.GetUnapprovedTransactionsEmpty(datadir2)
    time.sleep(1)
    transactions.GetUnapprovedTransactionsEmpty(datadir2)
    time.sleep(1)

    # wait 2-nd block
    blocks = _blocks.WaitBlocks(datadir2, 2)
    _lib.FatalAssert(len(blocks) == 2, "Should be 2 blocks on server 2")

    # 2 new TX to make next block
    tx = _transfers.Send(datadir, address1_1, address1_2, 1)
    tx = _transfers.Send(datadir, address1_1, address1_2, 1)
    time.sleep(1)
    tx = _transfers.Send(datadir, address1_1, address1_2, 1)

    # on second node only the last TX should appear soon
    txlist = _transfers.WaitUnapprovedTransactions(datadir2, 1, 6)

    # there can be 2 cases. this TX can be based on other TX which is currently under building of a block
    # in this case TX will fail on pull
    if (len(txlist) == 0):
        # wait while 3-rd block appears, after this TX should be added
        blocks = _blocks.WaitBlocks(datadir2, 3)
        _lib.FatalAssert(len(blocks) == 3, "Should be 3 blocks on server 2")

        txlist = _transfers.WaitUnapprovedTransactions(datadir2, 1, 6)

    _lib.FatalAssert(len(txlist) == 1, "Should be 1 transaction on server 2")

    _lib.FatalAssert(tx in txlist.keys(), "3-rd TX shoul be in keys")

    startnode.StopNode(datadir1, "Server 1")
    datadir1 = ""

    startnode.StopNode(datadir2, "Server 2")
    datadir2 = ""

    #_lib.RemoveTestFolder(datadir)
    _lib.EndTestGroupSuccess()
コード例 #4
0
ファイル: consensussql.py プロジェクト: sebczech/oursql
def test(testfilter):
    global datadirs
    _lib.CleanTestFolders()
    #return _complex.PrepareNodesWithSQL()

    _lib.StartTestGroup("Load ready BC into 6 nodes")

    dirs = _complex.Copy6NodesSQL()

    nodes = []

    i = 1
    for d in dirs:
        #get address in wallets in this dir
        balances = _transfers.GetGroupBalance(d)
        address = balances.keys()[0]

        port = str(30000 + i)

        nodes.append({
            'index': i - 1,
            'port': port,
            'datadir': d,
            'address': address,
            "title": "Server " + str(i)
        })

        #_transfers.ReindexUTXO(d)
        #txlist = transactions.GetUnapprovedTransactions(d)
        #print txlist
        #start this node
        #print os.path.basename(d)
        startnode.StartNodeConfig(d)

        i = i + 1
        datadirs.append(d)

    #check nodes on each node is correct
    for node in nodes:
        #print os.path.basename(node['datadir'])
        nodeslist = managenodes.GetNodes(node['datadir'])

        _lib.FatalAssert(
            len(nodeslist) == 2, "Should be 2 nodes on " + node["title"])

        if node['index'] == 0:
            _lib.FatalAssert("localhost:30005" in nodeslist,
                             "Node 6 should be on the node 0")
            _lib.FatalAssert("localhost:30004" in nodeslist,
                             "Node 5 should be on the node 0")
        if node['index'] == 1:
            _lib.FatalAssert("localhost:30002" in nodeslist,
                             "Node 2 should be on the node 1")
            _lib.FatalAssert("localhost:30003" in nodeslist,
                             "Node 3 should be on the node 1")
    #raise ValueError('Stop')
    # test blocks branches
    _lib.StartTestGroup("Check blockchain before updates")
    blocks1 = _blocks.GetBlocks(nodes[0]["datadir"])
    blocks2 = _blocks.GetBlocks(nodes[1]["datadir"])

    _lib.FatalAssert(len(blocks1) == 9, "First branch should have 9 blocks")
    _lib.FatalAssert(len(blocks2) == 8, "Second branch should have 8 blocks")

    _lib.FatalAssert(blocks1[2] == blocks2[1], "7 block must be same for both")
    _lib.FatalAssert(blocks1[1] != blocks2[0], "8 block must be different")

    _lib.StartTestGroup("Connect subnetworks")
    managenodes.AddNode(nodes[0]["datadir"], "localhost", '30001')

    # wait while blocks are exachanged
    _blocks.WaitBlocks(nodes[1]["datadir"], 9)

    s = 1
    time.sleep(2)

    while s < 10:
        rows1 = _lib.DBGetRows(nodes[1]['datadir'], "SELECT * FROM test", True)
        rows2 = _lib.DBGetRows(nodes[2]['datadir'], "SELECT * FROM test", True)
        rows3 = _lib.DBGetRows(nodes[3]['datadir'], "SELECT * FROM test", True)

        if ((rows1[1][1] == "row2_updated"
             or rows1[1][1] == "row2_updated_other")
                and (rows2[1][1] == "row2_updated"
                     or rows2[1][1] == "row2_updated_other")
                and (rows3[1][1] == "row2_updated"
                     or rows3[1][1] == "row2_updated_other")):
            break

        time.sleep(1)
        s = s + 1

    # get unapproved transactions (after block cancel)
    txlist = _transfers.WaitUnapprovedTransactions(nodes[1]["datadir"], 5, 15)
    #print(txlist)
    _lib.FatalAssert(
        len(txlist) == 5,
        "Should be 5 unapproved TXs, but has " + str(len(txlist)))

    #send another 2 TXs to have 9 required TXs
    balances = _transfers.GetGroupBalance(nodes[1]["datadir"])

    mainbalance = _transfers.GetGroupBalance(nodes[0]["datadir"])
    addr1 = balances.keys()[0]
    amount = "%.8f" % round(balances[addr1][0] / 5, 8)

    # add yet mode 4 TXs to complete a block
    _transfers.Send(nodes[1]["datadir"], addr1, mainbalance.keys()[0], amount)

    # 3 SQL txs
    # on another node. should go to the second node too
    _sql.ExecuteSQLOnProxy(nodes[0]['datadir'],
                           "INSERT INTO test SET b='row11', a=11")
    _sql.ExecuteSQLOnProxy(nodes[1]['datadir'],
                           "UPDATE test set b='row5_update_other' WHERE a=5")

    time.sleep(2)

    txlist = _transfers.WaitUnapprovedTransactions(nodes[0]["datadir"], 1, 10)
    # there should be minimum 1 tx, maximum 2. Because currency TX's can be based on other 1 currency TX's that are not yet on other nodes (from canceled block)
    _lib.FatalAssert(
        len(txlist) >= 1 and len(txlist) <= 2,
        "SHould be from 1 to 2 unapproved TXs on node 1")

    txlist = _transfers.WaitUnapprovedTransactions(nodes[1]["datadir"], 8, 10)

    _lib.FatalAssert(len(txlist) == 8, "SHould be 8 unapproved TXs")

    # after this TX new block should be created
    _sql.ExecuteSQLOnProxy(
        nodes[1]['datadir'],
        "UPDATE test set b='row11_update_other' WHERE a=11")

    # wait while new block created and posted to all other
    b1 = _blocks.WaitBlocks(nodes[1]["datadir"], 10)
    b2 = _blocks.WaitBlocks(nodes[0]["datadir"], 10)

    _lib.StartTestGroup("Check blockchain after updates")
    blocks2_0 = _blocks.GetBlocks(nodes[0]["datadir"])

    _lib.FatalAssert(len(blocks2_0) == 10, "10 block must be on node 0")
    _lib.FatalAssert(blocks2_0[1] == blocks1[0],
                     "9 block must be same for both")

    blocks2_1 = _blocks.GetBlocks(nodes[1]["datadir"])
    _lib.FatalAssert(len(blocks2_1) == 10, "10 block must be on node 1")
    _lib.FatalAssert(blocks2_1[1] == blocks1[0],
                     "9 block must be same for both")

    _lib.StartTestGroup("Node 2 " + os.path.basename(nodes[2]["datadir"]))
    _blocks.WaitBlocks(nodes[2]["datadir"], 10)

    blocks2_2 = _blocks.GetBlocks(nodes[2]["datadir"])

    _lib.FatalAssert(len(blocks2_2) == 10, "10 block must be on node 2")
    _lib.FatalAssert(blocks2_2[1] == blocks2_1[1],
                     "2-nd from top blocks on 2 must be same as on 1")

    _lib.StartTestGroup("Node 3 " + os.path.basename(nodes[3]["datadir"]))

    _blocks.WaitBlocks(nodes[3]["datadir"], 10)
    blocks2_3 = _blocks.GetBlocks(nodes[3]["datadir"])

    _lib.FatalAssert(len(blocks2_3) == 10, "10 block must be on node 3")
    _lib.FatalAssert(blocks2_3[1] == blocks2_1[1],
                     "2-nd from top blocks on  3 must be same as on 1")

    _lib.StartTestGroup("Node 4 " + os.path.basename(nodes[4]["datadir"]))

    _blocks.WaitBlocks(nodes[4]["datadir"], 10)
    blocks2_4 = _blocks.GetBlocks(nodes[4]["datadir"])

    _lib.FatalAssert(len(blocks2_4) == 10, "10 block must be on node 4")
    _lib.FatalAssert(blocks2_4[1] == blocks2_1[1],
                     "2-nd from top blocks on 4 must be same as on 1")

    _lib.StartTestGroup("Node 5 " + os.path.basename(nodes[5]["datadir"]))

    _blocks.WaitBlocks(nodes[5]["datadir"], 10)
    blocks2_5 = _blocks.GetBlocks(nodes[5]["datadir"])

    _lib.FatalAssert(len(blocks2_5) == 10, "10 block must be on node 5")
    _lib.FatalAssert(blocks2_5[1] == blocks2_1[1],
                     "2-nd from top blocks on 5 must be same as on 1")

    rows1 = _lib.DBGetRows(nodes[0]['datadir'], "SELECT * FROM test", True)
    rows2 = _lib.DBGetRows(nodes[1]['datadir'], "SELECT * FROM test", True)

    _lib.FatalAssert(rows1 == rows2,
                     "Table contents on node 1 and 2 must be same")

    rows3 = _lib.DBGetRows(nodes[2]['datadir'], "SELECT * FROM test", True)

    _lib.FatalAssert(rows1 == rows3,
                     "Table contents on node 1 and 3 must be same")

    rows4 = _lib.DBGetRows(nodes[3]['datadir'], "SELECT * FROM test", True)

    _lib.FatalAssert(rows1 == rows4,
                     "Table contents on node 1 and 4 must be same")

    rows5 = _lib.DBGetRows(nodes[4]['datadir'], "SELECT * FROM test", True)

    _lib.FatalAssert(rows1 == rows5,
                     "Table contents on node 1 and 5 must be same")

    rows6 = _lib.DBGetRows(nodes[5]['datadir'], "SELECT * FROM test", True)

    _lib.FatalAssert(rows1 == rows6,
                     "Table contents on node 1 and 6 must be same")

    _lib.StartTestGroup("Final checks")
    # should be empty list of transactions now
    transactions.GetUnapprovedTransactionsEmpty(nodes[1]["datadir"])

    for node in nodes:
        startnode.StopNode(node['datadir'])
        datadirs[node['index']] = ""

    #_lib.RemoveTestFolder(datadir)
    _lib.EndTestGroupSuccess()