Exemple #1
0
    def check_tx(self, tx):
        """ Validate the Tx before entry into the mempool """
        txdecoded = tx.decode()
        logger.info("CHECKING TX: " + txdecoded)
        txdict = decode_tx(txdecoded)

        tx = Transaction.from_dict(txdict)
        return Result.ok(log='thumbs up')
Exemple #2
0
 def deliver_tx(self, tx):
     """ Mutate state if valid Tx """
     txdecoded = tx.decode()
     logger.info("CHECKING TX: " + txdecoded)
     txdict = decode_tx(txdecoded)
     tx = Transaction.from_dict(txdict)
     self.handle_tx(tx)
     self.txCount += 1
     return Result.ok(log="delivered eshta")
Exemple #3
0
 def make_update_group_tx(self, **kwargs):
     t = Transaction("update-group", ACTION_DATA(**kwargs))
     return t
Exemple #4
0
 def make_update_aci_tx(self, **kwargs):
     t = Transaction("update-aci", ACTION_DATA(**kwargs))
     return t
Exemple #5
0
 def make_update_bobject_tx(self, **kwargs):
     t = Transaction("update-bobject", ACTION_DATA(**kwargs))
     return t
Exemple #6
0
 def make_update_user_tx(self, **kwargs):
     t = Transaction("update-user", ACTION_DATA(**kwargs))
     return t
Exemple #7
0
 def make_add_aci_tx(self, **kwargs):
     t = Transaction("add-aci", ACTION_DATA(**kwargs))
     return t
Exemple #8
0
 def make_delete_acl_tx(self, **kwargs):
     t = Transaction("delete-acl", ACTION_DATA(**kwargs))
     return t
Exemple #9
0
 def make_add_group_tx(self, **kwargs):
     t = Transaction("add-group", ACTION_DATA(**kwargs))
     return t
Exemple #10
0
 def make_add_user_tx(self, **kwargs):
     t = Transaction("add-user", ACTION_DATA(**kwargs))
     return t
Exemple #11
0
 def make_add_bobject_tx(self, **kwargs):
     t = Transaction("add-bobject", ACTION_DATA(**kwargs))
     return t
Exemple #12
0
 def make_update_bdomain_tx(self, **kwargs):
     t = Transaction("update-bdomain", ACTION_DATA(**kwargs))
     return t
Exemple #13
0
 def make_add_bdomain_tx(self, **kwargs):
     t = Transaction("add-bdomain", ACTION_DATA(**kwargs))
     return t