diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-04-24 15:29:50 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-04-24 15:29:58 +0200 |
commit | aedd2014ec50e2b52cad76d9c40c218ed0c9ccfc (patch) | |
tree | 3b4ef17e90f152a161c6929fbe1da07c366a4268 /src/exchangedb | |
parent | 36c568ab8df9b8e523c9ffc45271533af77accc7 (diff) |
-misc p2p fixes
Diffstat (limited to 'src/exchangedb')
-rw-r--r-- | src/exchangedb/exchange-0001-part.sql | 1 | ||||
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 11 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/exchangedb/exchange-0001-part.sql b/src/exchangedb/exchange-0001-part.sql index 0a333880b..4785964de 100644 --- a/src/exchangedb/exchange-0001-part.sql +++ b/src/exchangedb/exchange-0001-part.sql @@ -2647,6 +2647,7 @@ PERFORM IF NOT FOUND THEN out_no_balance=TRUE; + out_conflict=FALSE; RETURN; END IF; out_no_balance=FALSE; diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 93d71e594..d27ff7783 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -13066,7 +13066,7 @@ postgres_select_contract (void *cls, purse_pub), GNUNET_PQ_result_spec_auto_from_type ("contract_sig", econtract_sig), - GNUNET_PQ_result_spec_variable_size ("econtract", + GNUNET_PQ_result_spec_variable_size ("e_contract", econtract, econtract_size), GNUNET_PQ_result_spec_end @@ -13111,7 +13111,7 @@ postgres_select_contract_by_purse (void *cls, pub_ckey), GNUNET_PQ_result_spec_auto_from_type ("contract_sig", econtract_sig), - GNUNET_PQ_result_spec_variable_size ("econtract", + GNUNET_PQ_result_spec_variable_size ("e_contract", econtract, econtract_size), GNUNET_PQ_result_spec_end @@ -13430,8 +13430,9 @@ postgres_do_purse_deposit ( bool *conflict) { struct PostgresClosure *pg = cls; + uint64_t partner_id = 0; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_uint64 (0), /* FIXME: partner ID */ + GNUNET_PQ_query_param_uint64 (&partner_id), GNUNET_PQ_query_param_auto_from_type (purse_pub), TALER_PQ_query_param_amount (amount), GNUNET_PQ_query_param_auto_from_type (coin_pub), @@ -13537,7 +13538,9 @@ postgres_do_purse_merge ( GNUNET_PQ_query_param_auto_from_type (merge_sig), GNUNET_PQ_query_param_timestamp (&merge_timestamp), GNUNET_PQ_query_param_auto_from_type (reserve_sig), - GNUNET_PQ_query_param_string (partner_url), + (NULL == partner_url) + ? GNUNET_PQ_query_param_null () + : GNUNET_PQ_query_param_string (partner_url), GNUNET_PQ_query_param_auto_from_type (reserve_pub), GNUNET_PQ_query_param_end }; |