functional_tests: pop exactly what we need to test before testing

This commit is contained in:
moneromooo-monero 2019-05-26 18:14:01 +00:00
parent e037ecb014
commit 1fac83858a
No known key found for this signature in database
GPG Key ID: 686F07454D6CEFC3
10 changed files with 20 additions and 10 deletions

View File

@ -53,7 +53,8 @@ class BlockchainTest():
def reset(self):
print('Resetting blockchain')
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def _test_generateblocks(self, blocks):

View File

@ -45,7 +45,8 @@ class ColdSigningTest():
def reset(self):
print('Resetting blockchain')
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def create(self, idx):

View File

@ -44,7 +44,8 @@ class GetOutputDistributionTest():
def reset(self):
print('Resetting blockchain')
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def create(self):

View File

@ -53,7 +53,8 @@ class MiningTest():
def reset(self):
print('Resetting blockchain')
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def create(self):

View File

@ -81,7 +81,8 @@ class MultisigTest():
def reset(self):
print('Resetting blockchain')
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def mine(self, address, blocks):

View File

@ -50,7 +50,8 @@ class ProofsTest():
def reset(self):
print('Resetting blockchain')
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def mine(self, address, blocks):

View File

@ -50,7 +50,8 @@ class SpeedTest():
def reset(self):
print 'Resetting blockchain'
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def run_test(self):

View File

@ -56,7 +56,8 @@ class TransferTest():
def reset(self):
print('Resetting blockchain')
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def create(self):

View File

@ -46,7 +46,8 @@ class TransferTest():
def reset(self):
print('Resetting blockchain')
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def create(self):

View File

@ -74,7 +74,8 @@ class WalletTest():
def reset(self):
print('Resetting blockchain')
daemon = Daemon()
daemon.pop_blocks(1000)
res = daemon.get_height()
daemon.pop_blocks(res.height - 1)
daemon.flush_txpool()
def create(self):