Skip to content

Commit

Permalink
Various cleanups and add p2p tests to the pull tester.
Browse files Browse the repository at this point in the history
Remove unnecessary blockstore imports
Fix setgenerate -> generate in rpc tests
Reduce test iterations in maxblocksinflight
Add some p2p tests to pull-tester.
  • Loading branch information
sdaftuar committed Apr 28, 2015
1 parent de4066c commit 96c34c1
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 2 additions & 0 deletions qa/pull-tester/rpc-tests.sh
Expand Up @@ -30,6 +30,8 @@ testScripts=(
'proxy_test.py'
'merkle_blocks.py'
# 'forknotify.py'
'maxblocksinflight.py'
'invalidblockrequest.py'
);
if [ "x${ENABLE_BITCOIND}${ENABLE_UTILS}${ENABLE_WALLET}" = "x111" ]; then
for (( i = 0; i < ${#testScripts[@]}; i++ ))
Expand Down
2 changes: 1 addition & 1 deletion qa/rpc-tests/bipdersig-p2p.py
Expand Up @@ -74,7 +74,7 @@ def create_transaction(self, node, coinbase, to_address, amount):

def get_tests(self):

self.coinbase_blocks = self.nodes[0].setgenerate(True, 2)
self.coinbase_blocks = self.nodes[0].generate(2)
self.tip = int ("0x" + self.nodes[0].getbestblockhash() + "L", 0)
self.nodeaddress = self.nodes[0].getnewaddress()
self.last_block_time = time.time()
Expand Down
1 change: 0 additions & 1 deletion qa/rpc-tests/invalidblockrequest.py
Expand Up @@ -9,7 +9,6 @@
from comptool import TestManager, TestInstance
from mininode import *
from blocktools import *
from blockstore import BlockStore
import logging
import copy
import time
Expand Down
4 changes: 2 additions & 2 deletions qa/rpc-tests/maxblocksinflight.py
Expand Up @@ -44,9 +44,9 @@ def add_new_connection(self, connection):
def run(self):
try:
fail = False
self.connection.rpc.setgenerate(True, 1) # Leave IBD
self.connection.rpc.generate(1) # Leave IBD

numBlocksToGenerate = [ 8, 16, 128, 512, 1024, 4096, 8192, 40000, 80000 ]
numBlocksToGenerate = [ 8, 16, 128, 1024 ]
for count in range(len(numBlocksToGenerate)):
current_invs = []
for i in range(numBlocksToGenerate[count]):
Expand Down
1 change: 0 additions & 1 deletion qa/rpc-tests/script_test.py
Expand Up @@ -24,7 +24,6 @@
from comptool import TestInstance, TestManager
from mininode import *
from blocktools import *
from blockstore import BlockStore, TxStore
from script import *
import logging
import copy
Expand Down

0 comments on commit 96c34c1

Please sign in to comment.