auditor: fix SQL syntax and semantic errors

This commit is contained in:
Florian Dold 2018-10-21 04:31:17 +02:00
parent a0d88973b2
commit 7e426913ce
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 10 additions and 8 deletions

View File

@ -366,18 +366,20 @@ postgres_create_tables (void *cls)
we must check that the exchange reported these properly. */ we must check that the exchange reported these properly. */
GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS deposit_confirmations " GNUNET_PQ_make_execute ("CREATE TABLE IF NOT EXISTS deposit_confirmations "
"(master_pub BYTEA NOT NULL CHECK (LENGTH(master_pub)=32)" "(master_pub BYTEA NOT NULL CHECK (LENGTH(master_pub)=32)"
",h_contract_terms BYTEA PRIMARY KEY CHECK (LENGTH(h_contract_terms_hash)=64)" ",h_contract_terms BYTEA CHECK (LENGTH(h_contract_terms)=64)"
",h_wire BYTEA PRIMARY KEY CHECK (LENGTH(h_wire)=64)" ",h_wire BYTEA CHECK (LENGTH(h_wire)=64)"
",timestamp INT8 NOT NULL" ",timestamp INT8 NOT NULL"
",refund_deadline INT8 NOT NULL" ",refund_deadline INT8 NOT NULL"
",amount_with_fee_val INT8 NOT NULL" ",amount_with_fee_val INT8 NOT NULL"
",amount_with_fee_frac INT4 NOT NULL" ",amount_with_fee_frac INT4 NOT NULL"
",amount_with_fee_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL" ",amount_with_fee_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL"
",coin_pub BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" ",coin_pub BYTEA CHECK (LENGTH(coin_pub)=32)"
",merchant BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" ",merchant_pub BYTEA CHECK (LENGTH(merchant_pub)=32)"
",exchange_sig BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" ",exchange_sig BYTEA CHECK (LENGTH(exchange_sig)=64)"
",exchange_pub BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" ",exchange_pub BYTEA CHECK (LENGTH(exchange_pub)=32)"
",master_sig BYTEA PRIMARY KEY CHECK (LENGTH(coin_pub)=32)" ",master_sig BYTEA CHECK (LENGTH(master_sig)=64)"
",PRIMARY KEY (h_contract_terms, h_wire, coin_pub, "
" merchant_pub, exchange_sig, exchange_pub, master_sig)"
")"), ")"),
/* Table with historic business ledger; basically, when the exchange /* Table with historic business ledger; basically, when the exchange
operator decides to use operating costs for anything but wire operator decides to use operating costs for anything but wire

View File

@ -58,7 +58,7 @@ TEL_curl_easy_get (char *url)
{ {
/* With POST requests, we do not want to wait for the /* With POST requests, we do not want to wait for the
"100 Continue" response, as our request bodies are usually "100 Continue" response, as our request bodies are usually
small and directy sending them saves us a round trip. small and directy sending them saves us a round trip.
Clearing the expect header like this disables libcurl's Clearing the expect header like this disables libcurl's
default processing of the header. default processing of the header.