Exemplo n.º 1
0
class TestMinerSupr(unittest.TestCase):
    def setUp(self):
        self.minerSupr = MinerSupr('')

    def tearDown(self):
        pass

    def test_tick(self):
        self.minerSupr.tick()
Exemplo n.º 2
0
def runMiner(argv):
    action = argv[1]

    if action == 'generate':
        minerSupr = MinerSupr('')
        bgStr = minerSupr.bag()

        bgDict = json.loads(bgStr)
        address = bgDict['address']

        if len(argv) > 2:
            plotSize = int(argv[2])
        else:
            plotSize = 1
        genParams = GenParams(address, 1, plotSize, 1)

        genSupervisor = GenSupervisor(genParams)
        genSupervisor.init()
    elif action == 'mine':
        minerSupr = MinerSupr('')
        minerSupr.tick()