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')
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")
def make_update_group_tx(self, **kwargs): t = Transaction("update-group", ACTION_DATA(**kwargs)) return t
def make_update_aci_tx(self, **kwargs): t = Transaction("update-aci", ACTION_DATA(**kwargs)) return t
def make_update_bobject_tx(self, **kwargs): t = Transaction("update-bobject", ACTION_DATA(**kwargs)) return t
def make_update_user_tx(self, **kwargs): t = Transaction("update-user", ACTION_DATA(**kwargs)) return t
def make_add_aci_tx(self, **kwargs): t = Transaction("add-aci", ACTION_DATA(**kwargs)) return t
def make_delete_acl_tx(self, **kwargs): t = Transaction("delete-acl", ACTION_DATA(**kwargs)) return t
def make_add_group_tx(self, **kwargs): t = Transaction("add-group", ACTION_DATA(**kwargs)) return t
def make_add_user_tx(self, **kwargs): t = Transaction("add-user", ACTION_DATA(**kwargs)) return t
def make_add_bobject_tx(self, **kwargs): t = Transaction("add-bobject", ACTION_DATA(**kwargs)) return t
def make_update_bdomain_tx(self, **kwargs): t = Transaction("update-bdomain", ACTION_DATA(**kwargs)) return t
def make_add_bdomain_tx(self, **kwargs): t = Transaction("add-bdomain", ACTION_DATA(**kwargs)) return t