channeldb/graph: write max 80 sig len for nodes

This commit is contained in:
Johan T. Halseth committed 2018-12-05 09:31:26 +01:00
1 parent 5dcd2a4530
commit 3d7bbd6d72
1 file changed
+6
+6
View File
@@ -2839,6 +2839,12 @@ func putLightningNode(nodeBucket *bbolt.Bucket, aliasBucket *bbolt.Bucket,
}
}
sigLen := len(node.AuthSigBytes)
if sigLen > 80 {
return fmt.Errorf("max sig len allowed is 80, had %v",
sigLen)
}
err = wire.WriteVarBytes(&b, 0, node.AuthSigBytes)
if err != nil {
return err