@@ -244,7 +244,7 @@ void marshal_rhashes(const struct sha256 *rhashes,
244244 }
245245}
246246
247- void marshal_htlc (const struct existing_htlc *htlc, HTLCInfo *o_htlc)
247+ void marshal_htlc (const struct simple_htlc *htlc, HTLCInfo *o_htlc)
248248{
249249 o_htlc->set_value_sat (htlc->amount .millisatoshis / 1000 );
250250 o_htlc->set_payment_hash (&htlc->payment_hash , sizeof (htlc->payment_hash ));
@@ -768,7 +768,7 @@ proxy_stat proxy_handle_sign_remote_commitment_tx(
768768 struct node_id *peer_id,
769769 u64 dbid,
770770 const struct pubkey *remote_per_commit,
771- struct existing_htlc **htlcs,
771+ struct simple_htlc **htlcs,
772772 u64 commit_num, u32 feerate,
773773 struct bitcoin_signature *o_sig)
774774{
@@ -787,7 +787,7 @@ proxy_stat proxy_handle_sign_remote_commitment_tx(
787787 dump_pubkey (counterparty_funding_pubkey).c_str (),
788788 dump_pubkey (remote_per_commit).c_str (),
789789 dump_tx (tx).c_str (),
790- dump_htlcs ((const struct existing_htlc **) htlcs, tal_count (htlcs)).c_str (),
790+ dump_htlcs ((const struct simple_htlc **) htlcs, tal_count (htlcs)).c_str (),
791791 commit_num, feerate
792792 );
793793
@@ -799,7 +799,7 @@ proxy_stat proxy_handle_sign_remote_commitment_tx(
799799 req.mutable_remote_per_commit_point ());
800800 marshal_single_input_tx (tx, NULL , req.mutable_tx ());
801801 for (size_t ii = 0 ; ii < tal_count (htlcs); ++ii) {
802- if (htlc_state_owner ( htlcs[ii]->state ) == REMOTE) {
802+ if (htlcs[ii]->side == REMOTE) {
803803 marshal_htlc (htlcs[ii], req.add_offered_htlcs ());
804804 } else {
805805 marshal_htlc (htlcs[ii], req.add_received_htlcs ());
@@ -1105,7 +1105,7 @@ proxy_stat proxy_handle_sign_commitment_tx(
11051105 const struct pubkey *counterparty_funding_pubkey,
11061106 struct node_id *peer_id,
11071107 u64 dbid,
1108- struct existing_htlc **htlcs,
1108+ struct simple_htlc **htlcs,
11091109 u64 commit_num, u32 feerate,
11101110 struct bitcoin_signature *o_sig)
11111111{
@@ -1122,7 +1122,7 @@ proxy_stat proxy_handle_sign_commitment_tx(
11221122 dbid,
11231123 dump_pubkey (counterparty_funding_pubkey).c_str (),
11241124 dump_tx (tx).c_str (),
1125- dump_htlcs ((const struct existing_htlc **) htlcs, tal_count (htlcs)).c_str (),
1125+ dump_htlcs ((const struct simple_htlc **) htlcs, tal_count (htlcs)).c_str (),
11261126 commit_num, feerate
11271127 );
11281128
@@ -1132,7 +1132,7 @@ proxy_stat proxy_handle_sign_commitment_tx(
11321132 marshal_channel_nonce (peer_id, dbid, req.mutable_channel_nonce ());
11331133 marshal_single_input_tx (tx, NULL , req.mutable_tx ());
11341134 for (size_t ii = 0 ; ii < tal_count (htlcs); ++ii) {
1135- if (htlc_state_owner ( htlcs[ii]->state ) == LOCAL) {
1135+ if (htlcs[ii]->side == LOCAL) {
11361136 marshal_htlc (htlcs[ii], req.add_offered_htlcs ());
11371137 } else {
11381138 marshal_htlc (htlcs[ii], req.add_received_htlcs ());
@@ -1166,7 +1166,7 @@ proxy_stat proxy_handle_validate_commitment_tx(
11661166 struct bitcoin_tx *tx,
11671167 struct node_id *peer_id,
11681168 u64 dbid,
1169- struct existing_htlc **htlcs,
1169+ struct simple_htlc **htlcs,
11701170 u64 commit_num, u32 feerate,
11711171 struct bitcoin_signature *commit_sig,
11721172 struct bitcoin_signature *htlc_sigs,
@@ -1186,7 +1186,7 @@ proxy_stat proxy_handle_validate_commitment_tx(
11861186 dump_node_id (peer_id).c_str (),
11871187 dbid,
11881188 dump_tx (tx).c_str (),
1189- dump_htlcs ((const struct existing_htlc **) htlcs, tal_count (htlcs)).c_str (),
1189+ dump_htlcs ((const struct simple_htlc **) htlcs, tal_count (htlcs)).c_str (),
11901190 commit_num, feerate,
11911191 dump_bitcoin_signature (commit_sig).c_str (),
11921192 dump_htlc_signatures (htlc_sigs).c_str ()
@@ -1198,7 +1198,7 @@ proxy_stat proxy_handle_validate_commitment_tx(
11981198 marshal_channel_nonce (peer_id, dbid, req.mutable_channel_nonce ());
11991199 marshal_single_input_tx (tx, NULL , req.mutable_tx ());
12001200 for (size_t ii = 0 ; ii < tal_count (htlcs); ++ii) {
1201- if (htlc_state_owner ( htlcs[ii]->state ) == LOCAL) {
1201+ if (htlcs[ii]->side == LOCAL) {
12021202 marshal_htlc (htlcs[ii], req.add_offered_htlcs ());
12031203 } else {
12041204 marshal_htlc (htlcs[ii], req.add_received_htlcs ());
0 commit comments