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
2016-12-24 16:57:59 -06:00
parent e5490b55f4
commit 78ce39692e
2 changed files with 0 additions and 68 deletions

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,