lnwire: remove channel graph announcement validation tests

This commit removes the previous test cases which excised the proper
validation of graph announcements on the network. As full generation of
the authenticated messages has not yet been implemented, these tests
aren’t currently applicable.

In a future commit, these tests will be replicated on the new discovery
package which will handle producing the channel proofs and also fully
validating them.
This commit is contained in:
Olaoluwa Osuntokun committed 2016-12-27 16:43:48 -08:00
1 parent e5490b55f4
commit 78ce39692e
2 files changed
-68

No files matched your search

-26
View File
@@ -68,32 +68,6 @@ func TestNodeAnnoucementValidation(t *testing.T) {
}
}
func TestNodeAnnoucementBadValidation(t *testing.T) {
getKeys := func(s string) (*btcec.PrivateKey, *btcec.PublicKey) {
return btcec.PrivKeyFromBytes(btcec.S256(), []byte(s))
}
na := &NodeAnnouncement{
Timestamp: maxUint32,
Address: someAddress,
NodeID: pubKey, // wrong pubkey
RGBColor: someRGB,
pad: maxUint16,
Alias: someAlias,
}
nodePrivKey, _ := getKeys("node-id-1")
dataToSign, _ := na.DataToSign()
hash := wire.DoubleSha256(dataToSign)
signature, _ := nodePrivKey.Sign(hash)
na.Signature = signature
if err := na.Validate(); err == nil {
t.Fatal("error wasn't raised")
}
}
func TestNodeAnnoucementPayloadLength(t *testing.T) {
na := &NodeAnnouncement{
Signature: someSig,