parser.add_argument('-p', '--port', default=8000)
    parser.add_argument('--debug', default=True, action="store_true")
    parser.add_argument('--private-key',
                        dest="private_key",
                        required=True,
                        help="ECDSA private key for signing")
    parser.add_argument('--public-key',
                        dest="public_key",
                        required=True,
                        help="ECDSA private key for signing")

    log.info("Parsing arguments")
    args = parser.parse_args()

    hdlrs = [
        (r"^/transaction$", TransactionHandler),
        (r"^/transaction/(.*)", TransactionHandler),
    ]

    log.info("Creating new tornado.web.Application")
    application = TransactionService(hdlrs, log=log, **vars(args))

    log.info("Starting transaction service on port %s" % args.port)
    application.listen(args.port)
    tornado.ioloop.IOLoop.current().start()


if __name__ == "__main__":
    run()
    postgres.close_connection_pool()
    logging.basicConfig(format="%(asctime)s %(levelname)s - %(message)s", level=logging.DEBUG)
    log = logging.getLogger("txn-service")
    log.info("Setting up argparse")
    parser = argparse.ArgumentParser(description='Process some integers.', prog='python -m blockchain')
    parser.add_argument('-p', '--port', default=8000)
    parser.add_argument('--debug', default=True, action="store_true")
    parser.add_argument('--private-key', dest="private_key", required=True, help="ECDSA private key for signing")
    parser.add_argument('--public-key', dest="public_key", required=True, help="ECDSA private key for signing")

    log.info("Parsing arguments")
    args = parser.parse_args()

    hdlrs = [
        (r"^/transaction$", TransactionHandler),
        (r"^/transaction/(.*)", TransactionHandler),
    ]

    log.info("Creating new tornado.web.Application")
    application = TransactionService(hdlrs,
        log = log,
        **vars(args))

    log.info("Starting transaction service on port %s" % args.port)
    application.listen(args.port)
    tornado.ioloop.IOLoop.current().start()

if __name__ == "__main__":
    run()
    postgres.close_connection_pool()