def do_import(self, timestamp):
    'Call one key import RPC.'
    if (self.call == Call.single):
        if (self.data == Data.address):
            response = self.try_rpc(self.node.importaddress, self.address['address'], self.label, (self.rescan == Rescan.yes))
        elif (self.data == Data.pub):
            response = self.try_rpc(self.node.importpubkey, self.address['pubkey'], self.label, (self.rescan == Rescan.yes))
        elif (self.data == Data.priv):
            response = self.try_rpc(self.node.importprivkey, self.key, self.label, (self.rescan == Rescan.yes))
        assert_equal(response, None)
    elif (self.call == Call.multi):
        response = self.node.importmulti([{'scriptPubKey': {'address': self.address['address']}, 'timestamp': ((timestamp + TIMESTAMP_WINDOW) + (1 if (self.rescan == Rescan.late_timestamp) else 0)), 'pubkeys': ([self.address['pubkey']] if (self.data == Data.pub) else []), 'keys': ([self.key] if (self.data == Data.priv) else []), 'label': self.label, 'watchonly': (self.data != Data.priv)}], {'rescan': (self.rescan in (Rescan.yes, Rescan.late_timestamp))})
        assert_equal(response, [{'success': True}])
Call one key import RPC.
def do_import(self, timestamp):
    
    if (self.call == Call.single):
        if (self.data == Data.address):
            response = self.try_rpc(self.node.importaddress, self.address['address'], self.label, (self.rescan == Rescan.yes))
        elif (self.data == Data.pub):
            response = self.try_rpc(self.node.importpubkey, self.address['pubkey'], self.label, (self.rescan == Rescan.yes))
        elif (self.data == Data.priv):
            response = self.try_rpc(self.node.importprivkey, self.key, self.label, (self.rescan == Rescan.yes))
        assert_equal(response, None)
    elif (self.call == Call.multi):
        response = self.node.importmulti([{'scriptPubKey': {'address': self.address['address']}, 'timestamp': ((timestamp + TIMESTAMP_WINDOW) + (1 if (self.rescan == Rescan.late_timestamp) else 0)), 'pubkeys': ([self.address['pubkey']] if (self.data == Data.pub) else []), 'keys': ([self.key] if (self.data == Data.priv) else []), 'label': self.label, 'watchonly': (self.data != Data.priv)}], {'rescan': (self.rescan in (Rescan.yes, Rescan.late_timestamp))})
        assert_equal(response, [{'success': True}])