Skip to content

Commit

Permalink
Merge pull request #130 from tnull/2023-06-update-field-numbers
Browse files Browse the repository at this point in the history
Update serialization field numbers for consistency and to break compat. with alpha
  • Loading branch information
tnull authored Jun 22, 2023
2 parents 68a5086 + da1588e commit e284b71
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
14 changes: 7 additions & 7 deletions src/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,22 +87,22 @@ impl_writeable_tlv_based_enum!(Event,
},
(2, PaymentReceived) => {
(0, payment_hash, required),
(1, amount_msat, required),
(2, amount_msat, required),
},
(3, ChannelReady) => {
(0, channel_id, required),
(1, user_channel_id, required),
(2, user_channel_id, required),
},
(4, ChannelPending) => {
(0, channel_id, required),
(1, user_channel_id, required),
(2, former_temporary_channel_id, required),
(3, counterparty_node_id, required),
(4, funding_txo, required),
(2, user_channel_id, required),
(4, former_temporary_channel_id, required),
(6, counterparty_node_id, required),
(8, funding_txo, required),
},
(5, ChannelClosed) => {
(0, channel_id, required),
(1, user_channel_id, required),
(2, user_channel_id, required),
};
);

Expand Down
10 changes: 5 additions & 5 deletions src/payment_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ pub struct PaymentDetails {

impl_writeable_tlv_based!(PaymentDetails, {
(0, hash, required),
(1, preimage, required),
(2, secret, required),
(3, amount_msat, required),
(4, direction, required),
(5, status, required)
(2, preimage, required),
(4, secret, required),
(6, amount_msat, required),
(8, direction, required),
(10, status, required)
});

/// Represents the direction of a payment.
Expand Down

0 comments on commit e284b71

Please sign in to comment.