mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-29 07:00:55 +02:00
lnwire: extend RawFeatureVector with helper methods
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
5a9f499dd5
commit
031d7b1d55
@@ -193,9 +193,11 @@ func TestWriteRawFeatureVector(t *testing.T) {
|
||||
require.Equal(t, ErrNilFeatureVector, err)
|
||||
|
||||
// Create a raw feature vector.
|
||||
feature := &RawFeatureVector{features: map[FeatureBit]bool{
|
||||
InitialRoutingSync: true, // FeatureBit 3.
|
||||
}}
|
||||
feature := &RawFeatureVector{
|
||||
features: map[FeatureBit]struct{}{
|
||||
InitialRoutingSync: {}, // FeatureBit 3.
|
||||
},
|
||||
}
|
||||
expectedBytes := []byte{
|
||||
0, 1, // First two bytes encode the length.
|
||||
8, // Last byte encodes the feature bit (1 << 3).
|
||||
|
Reference in New Issue
Block a user