Esempio n. 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')
Esempio n. 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")
Esempio n. 3
0
 def make_update_group_tx(self, **kwargs):
     t = Transaction("update-group", ACTION_DATA(**kwargs))
     return t
Esempio n. 4
0
 def make_update_aci_tx(self, **kwargs):
     t = Transaction("update-aci", ACTION_DATA(**kwargs))
     return t
Esempio n. 5
0
 def make_update_bobject_tx(self, **kwargs):
     t = Transaction("update-bobject", ACTION_DATA(**kwargs))
     return t
Esempio n. 6
0
 def make_update_user_tx(self, **kwargs):
     t = Transaction("update-user", ACTION_DATA(**kwargs))
     return t
Esempio n. 7
0
 def make_add_aci_tx(self, **kwargs):
     t = Transaction("add-aci", ACTION_DATA(**kwargs))
     return t
Esempio n. 8
0
 def make_delete_acl_tx(self, **kwargs):
     t = Transaction("delete-acl", ACTION_DATA(**kwargs))
     return t
Esempio n. 9
0
 def make_add_group_tx(self, **kwargs):
     t = Transaction("add-group", ACTION_DATA(**kwargs))
     return t
Esempio n. 10
0
 def make_add_user_tx(self, **kwargs):
     t = Transaction("add-user", ACTION_DATA(**kwargs))
     return t
Esempio n. 11
0
 def make_add_bobject_tx(self, **kwargs):
     t = Transaction("add-bobject", ACTION_DATA(**kwargs))
     return t
Esempio n. 12
0
 def make_update_bdomain_tx(self, **kwargs):
     t = Transaction("update-bdomain", ACTION_DATA(**kwargs))
     return t
Esempio n. 13
0
 def make_add_bdomain_tx(self, **kwargs):
     t = Transaction("add-bdomain", ACTION_DATA(**kwargs))
     return t