removing extra spaces, correcting argument counts

This commit is contained in:
Christian Grothoff 2015-05-07 13:33:19 +02:00
parent 1fe362112a
commit e2fb24f0a9

View File

@ -391,7 +391,7 @@ postgres_prepare (PGconn *db_conn)
") VALUES " ") VALUES "
"($1, $2, $3, $4, $5, $6," "($1, $2, $3, $4, $5, $6,"
"$7, $8, $9, $10, $11, $12, $13, $14);", "$7, $8, $9, $10, $11, $12, $13, $14);",
12, NULL); 14, NULL);
PREPARE ("get_reserve", PREPARE ("get_reserve",
"SELECT " "SELECT "
"current_balance_val" "current_balance_val"
@ -418,7 +418,7 @@ postgres_prepare (PGconn *db_conn)
",current_balance_val=$2 " ",current_balance_val=$2 "
",current_balance_frac=$3 " ",current_balance_frac=$3 "
"WHERE current_balance_curr=$4 AND reserve_pub=$5 ", "WHERE current_balance_curr=$4 AND reserve_pub=$5 ",
4, NULL); 5, NULL);
PREPARE ("create_reserves_in_transaction", PREPARE ("create_reserves_in_transaction",
"INSERT INTO reserves_in (" "INSERT INTO reserves_in ("
" reserve_pub," " reserve_pub,"
@ -448,7 +448,7 @@ postgres_prepare (PGconn *db_conn)
" denom_pub, denom_sig" " denom_pub, denom_sig"
",reserve_sig, reserve_pub " ",reserve_sig, reserve_pub "
"FROM collectable_blindcoins " "FROM collectable_blindcoins "
"WHERE blind_ev = $1", "WHERE blind_ev=$1",
1, NULL); 1, NULL);
PREPARE ("get_reserves_blindcoins", PREPARE ("get_reserves_blindcoins",
"SELECT" "SELECT"
@ -465,7 +465,7 @@ postgres_prepare (PGconn *db_conn)
",num_newcoins" ",num_newcoins"
",noreveal_index" ",noreveal_index"
" FROM refresh_sessions " " FROM refresh_sessions "
" WHERE session_hash = $1 ", " WHERE session_hash=$1 ",
1, NULL); 1, NULL);
PREPARE ("insert_refresh_session", PREPARE ("insert_refresh_session",
"INSERT INTO refresh_sessions ( " "INSERT INTO refresh_sessions ( "
@ -478,7 +478,7 @@ postgres_prepare (PGconn *db_conn)
4, NULL); 4, NULL);
PREPARE ("get_known_coin", PREPARE ("get_known_coin",
"SELECT " "SELECT"
" coin_pub, denom_pub, denom_sig " " coin_pub, denom_pub, denom_sig "
",expended_val, expended_frac, expended_curr " ",expended_val, expended_frac, expended_curr "
",refresh_session_hash " ",refresh_session_hash "
@ -487,7 +487,7 @@ postgres_prepare (PGconn *db_conn)
1, NULL); 1, NULL);
PREPARE ("update_known_coin", PREPARE ("update_known_coin",
"UPDATE known_coins " "UPDATE known_coins "
"SET " "SET"
" denom_pub = $2 " " denom_pub = $2 "
",denom_sig = $3 " ",denom_sig = $3 "
",expended_val = $4 " ",expended_val = $4 "
@ -495,7 +495,7 @@ postgres_prepare (PGconn *db_conn)
",expended_curr = $6 " ",expended_curr = $6 "
",refresh_session_hash = $7 " ",refresh_session_hash = $7 "
"WHERE " "WHERE "
" coin_pub = $1 ", " coin_pub = $1",
7, NULL); 7, NULL);
PREPARE ("insert_known_coin", PREPARE ("insert_known_coin",
"INSERT INTO known_coins (" "INSERT INTO known_coins ("
@ -510,29 +510,29 @@ postgres_prepare (PGconn *db_conn)
"VALUES ($1,$2,$3,$4,$5,$6,$7)", "VALUES ($1,$2,$3,$4,$5,$6,$7)",
7, NULL); 7, NULL);
PREPARE ("get_refresh_commit_link", PREPARE ("get_refresh_commit_link",
"SELECT " "SELECT"
" transfer_pub " " transfer_pub "
",link_secret_enc " ",link_secret_enc "
"FROM refresh_commit_link " "FROM refresh_commit_link "
"WHERE session_hash = $1 AND cnc_index = $2 AND oldcoin_index = $3", "WHERE session_hash = $1 AND cnc_index = $2 AND oldcoin_index = $3",
3, NULL); 3, NULL);
PREPARE ("get_refresh_commit_coin", PREPARE ("get_refresh_commit_coin",
"SELECT " "SELECT"
" link_vector_enc " " link_vector_enc "
",coin_ev " ",coin_ev "
"FROM refresh_commit_coin " "FROM refresh_commit_coin "
"WHERE session_hash = $1 AND cnc_index = $2 AND newcoin_index = $3", "WHERE session_hash = $1 AND cnc_index = $2 AND newcoin_index = $3",
3, NULL); 3, NULL);
PREPARE ("insert_refresh_order", PREPARE ("insert_refresh_order",
"INSERT INTO refresh_order ( " "INSERT INTO refresh_order ("
" newcoin_index " " newcoin_index "
",session_hash " ",session_hash "
",denom_pub " ",denom_pub "
") " ") "
"VALUES ($1, $2, $3) ", "VALUES ($1, $2, $3)",
3, NULL); 3, NULL);
PREPARE ("insert_refresh_melt", PREPARE ("insert_refresh_melt",
"INSERT INTO refresh_melt ( " "INSERT INTO refresh_melt ("
" session_hash " " session_hash "
",oldcoin_index " ",oldcoin_index "
",coin_pub " ",coin_pub "
@ -546,8 +546,8 @@ postgres_prepare (PGconn *db_conn)
",fee_frac " ",fee_frac "
",fee_curr " ",fee_curr "
") " ") "
"VALUES ($1, $2, $3, $4) ", "VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)",
3, NULL); 12, NULL);
PREPARE ("get_refresh_order", PREPARE ("get_refresh_order",
"SELECT denom_pub " "SELECT denom_pub "
"FROM refresh_order " "FROM refresh_order "
@ -564,7 +564,7 @@ postgres_prepare (PGconn *db_conn)
"WHERE session_hash = $1 AND oldcoin_index = $2", "WHERE session_hash = $1 AND oldcoin_index = $2",
2, NULL); 2, NULL);
PREPARE ("insert_refresh_commit_link", PREPARE ("insert_refresh_commit_link",
"INSERT INTO refresh_commit_link ( " "INSERT INTO refresh_commit_link ("
" session_hash " " session_hash "
",transfer_pub " ",transfer_pub "
",cnc_index " ",cnc_index "
@ -574,27 +574,27 @@ postgres_prepare (PGconn *db_conn)
"VALUES ($1, $2, $3, $4, $5) ", "VALUES ($1, $2, $3, $4, $5) ",
5, NULL); 5, NULL);
PREPARE ("insert_refresh_commit_coin", PREPARE ("insert_refresh_commit_coin",
"INSERT INTO refresh_commit_coin ( " "INSERT INTO refresh_commit_coin ("
" session_hash " " session_hash "
",coin_ev " ",coin_ev "
",cnc_index " ",cnc_index "
",newcoin_index " ",newcoin_index "
",link_vector_enc " ",link_vector_enc "
") " ") "
"VALUES ($1, $2, $3, $4, $5) ", "VALUES ($1, $2, $3, $4, $5)",
5, NULL); 5, NULL);
PREPARE ("insert_refresh_collectable", PREPARE ("insert_refresh_collectable",
"INSERT INTO refresh_collectable ( " "INSERT INTO refresh_collectable ("
" session_hash " " session_hash "
",newcoin_index " ",newcoin_index "
",ev_sig " ",ev_sig "
") " ") "
"VALUES ($1, $2, $3) ", "VALUES ($1, $2, $3)",
3, NULL); 3, NULL);
PREPARE ("set_reveal_ok", PREPARE ("set_reveal_ok",
"UPDATE refresh_sessions " "UPDATE refresh_sessions "
"SET reveal_ok = TRUE " "SET reveal_ok = TRUE "
"WHERE session_hash = $1 ", "WHERE session_hash = $1",
1, NULL); 1, NULL);
PREPARE ("get_link", PREPARE ("get_link",
"SELECT link_vector_enc, ro.denom_pub, ev_sig " "SELECT link_vector_enc, ro.denom_pub, ev_sig "