This commit is contained in:
Christian Grothoff 2015-06-03 14:12:26 +02:00
parent 7ef583bfcb
commit ca8eb3ec5c

View File

@ -547,34 +547,34 @@ postgres_prepare (PGconn *db_conn)
" 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 "
"VALUES ($1, $2, $3)", "($1, $2, $3);",
3, NULL); 3, NULL);
PREPARE ("insert_refresh_melt", PREPARE ("insert_refresh_melt",
"INSERT INTO refresh_melts (" "INSERT INTO refresh_melts "
" coin_pub " "(coin_pub "
",session" ",session"
",oldcoin_index " ",oldcoin_index "
",coin_sig " ",coin_sig "
",amount_val " ",amount_val "
",amount_frac " ",amount_frac "
",amount_curr " ",amount_curr "
") " ") VALUES "
"VALUES ($1, $2, $3, $4, $5, $6, $7)", "($1, $2, $3, $4, $5, $6, $7);",
7, NULL); 7, NULL);
PREPARE ("get_refresh_melt", PREPARE ("get_refresh_melt",
"SELECT" "SELECT"
@ -584,8 +584,10 @@ postgres_prepare (PGconn *db_conn)
",amount_frac" ",amount_frac"
",amount_curr" ",amount_curr"
" FROM refresh_melts " " FROM refresh_melts "
"WHERE session = $1 AND oldcoin_index = $2", "WHERE session=$1 AND oldcoin_index=$2",
2, NULL); 2, NULL);
/* FIXME: should have a way to query the 'refresh_melts' by
coin public key (#3813) */
PREPARE ("get_refresh_order", PREPARE ("get_refresh_order",
"SELECT denom_pub " "SELECT denom_pub "
"FROM refresh_order " "FROM refresh_order "