Ejemplo n.º 1
0
def test_holy_getdifficulty():

    get_diff = Holy(network="peercoin").getdifficulty()

    assert isinstance(get_diff, dict)
    assert sorted(get_diff.keys()) == [
        'proof-of-stake', 'proof-of-work', 'search-interval'
    ]
Ejemplo n.º 2
0
def test_holy_getaddress():

    getaddress = Holy(
        network="peercoin").getaddress('PXBf64T4gqKcn7Kruw75X8V5yeci34HG92')

    assert isinstance(getaddress, dict)
    assert sorted(getaddress.keys()) == [
        'address', 'balance', 'last_txs', 'received', 'sent'
    ]
Ejemplo n.º 3
0
def test_holy_getblock():

    getblock = Holy(network="peercoin").getblock(
        "be48bcf5155b4650d75d600bf1e9f37a5a049c2905542c6ced43ec0cb57673e8")

    assert isinstance(getblock, dict)
    assert sorted(getblock.keys()) == [
        'bits', 'difficulty', 'entropybit', 'flags', 'hash', 'height',
        'merkleroot', 'mint', 'modifier', 'modifierchecksum', 'nextblockhash',
        'nonce', 'previousblockhash', 'proofhash', 'size', 'time', 'tx',
        'version'
    ]
Ejemplo n.º 4
0
def test_holy_getrawtransaction(decrypt):

    getrawtransaction = Holy(network="peercoin").getrawtransaction(
        'e4c8ebffe416836faa8f35ae9bc630cc2ac706faebc4e40d5556a755024a3689',
        decrypt)

    if decrypt:
        assert isinstance(getrawtransaction, dict)
        assert sorted(getrawtransaction.keys()) == [
            'blockhash', 'blocktime', 'confirmations', 'hex', 'locktime',
            'time', 'txid', 'version', 'vin', 'vout'
        ]
    else:
        assert isinstance(getrawtransaction, bytes)