Commit Graph

8 Commits

Author SHA1 Message Date
Keagan McClelland
1a5b5c5f62
lntypes: Add a ChannelParty type.
This commit introduces a ChannelParty type to LND. It is useful for
consolidating all references to the duality between the local and
remote nodes. This is currently handled by having named struct rows
or named boolean parameters, named either "local" or "remote". This
change alleviates the programmer from having to decide which node
should be bound to `true` or `false`. In an upcoming commit we will
change callsites to use this.
2024-07-31 14:50:23 -07:00
yyforyongyu
dc9a0b31c0
lntypes: add new units WeightUnit and VByte 2024-05-24 23:56:28 +08:00
bitromortac
99273cc5e1
lntypes+routing: add generic Min/Max functions 2022-12-12 13:22:28 +01:00
Joost Jager
afd86763ac
lntypes: add ZeroHash 2019-06-05 12:41:41 +02:00
Joost Jager
c4263e7061
lntypes: return a value from constructors
Returning pointers proved inconvenient in almost all cases. This commmit
converts the constructors to returning values.
2019-03-15 10:08:38 +01:00
Joost Jager
10a655b6b1
lntypes: add preimage Matches method 2019-03-15 10:08:26 +01:00
Conner Fromknecht
2d8bc99d9e
lntypes/preimage: add MakePreimage initializer 2019-02-19 17:05:45 -08:00
Joost Jager
18698663c5
lnhash: create Hash and Preimage types
This commit adds new hash and preimage types. These types are
similar to chainhash.Hash, except for that string representations
are not reversed.

The reason for adding dedicated types and not use [32]byte, is to
facilitate logging (%v displays as hex string) and have
standard methods to convert from byte slice and string with a
length check.
2019-02-01 09:42:23 +01:00