def test_parse_masternode_status_vin():
    from dashlib import parse_masternode_status_vin
    status = mn_status_good()
    vin = parse_masternode_status_vin(status['vin'])
    assert vin == 'f68a2e5d64f4a9be7ff8d0fbd9059dcd3ce98ad7a19a9260d1d6709127ffac56-1'

    status = mn_status_bad()
    vin = parse_masternode_status_vin(status['vin'])
    assert vin == None
예제 #2
0
    def get_current_masternode_vin(self):
        from dashlib import parse_masternode_status_vin

        my_vin = None

        try:
            status = self.rpc_command('masternode', 'status')
            my_vin = parse_masternode_status_vin(status['vin'])
        except JSONRPCException as e:
            pass

        return my_vin
예제 #3
0
    def get_current_masternode_vin(self):
        from dashlib import parse_masternode_status_vin

        my_vin = None

        try:
            status = self.rpc_command('masternode', 'status')
            mn_outpoint = status.get('outpoint') or status.get('vin')
            my_vin = parse_masternode_status_vin(mn_outpoint)
        except JSONRPCException as e:
            pass

        return my_vin