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")