def METHOD_NAME(self, msg: dict)  -> bool:
    masternodes_from_smartcontract = self.driver.driver.get(f'masternodes.S:members') or []
    if msg['sender'] not in masternodes_from_smartcontract and msg['sender'] != self.wallet.verifying_key:
        self.log.error(f'TX Batch received from non-master {msg["sender"][:8]}')
        return False
    else:
        return True