lnwire: add new ChanUpdateFlag for the ChannelUpdate flag bitmask

In this commit, we add a new type to the lnwire package:
ChanUpdateFlag. This type represent the bitfield that’s used within the
ChannelUpdate message to give additional details as how the message
should be interpreted.
This commit is contained in:
Olaoluwa Osuntokun
2017-11-30 22:21:27 -08:00
parent c3ec32e67b
commit 5e3dbfcd78
3 changed files with 36 additions and 4 deletions

View File

@@ -427,7 +427,7 @@ func TestLightningWireProtocol(t *testing.T) {
Signature: testSig,
ShortChannelID: NewShortChanIDFromInt(uint64(r.Int63())),
Timestamp: uint32(r.Int31()),
Flags: uint16(r.Int31()),
Flags: ChanUpdateFlag(r.Int31()),
TimeLockDelta: uint16(r.Int31()),
HtlcMinimumMsat: MilliSatoshi(r.Int63()),
BaseFee: uint32(r.Int31()),