mirror of
https://github.com/matrix-org/pinecone.git
synced 2026-01-16 23:00:32 +00:00
* Hybrid routing * Clear the coords cache when the root changes * Define `coordsCacheLifetime` * Refactor sim pings to use router FilterFn for hop counting * Various tweaks, fix stretch calc, two packet types again temporarily * Back to a single packet type again * Speed up sim, link prioritisation for tree routing * Put consts together * Preamble pings so `simws` peers don't cause panics * Don't drop things that aren't pings * Smaller tree announcements * Don't send a watermark when tree-routing * Fix frame test and add new test for hybrid routing variants * Cleanup sim adversaries to match new protocol types * Refactor sim stretch reporting * Start ping hop count at 1 since dest node doesn't increment count * Move coords cache timer interval to a constant * Add TODO Co-authored-by: Devon Hudson <devonhudson@librem.one>
27 lines
1 KiB
Go
27 lines
1 KiB
Go
// Copyright 2021 The Matrix.org Foundation C.I.C.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package router
|
|
|
|
const (
|
|
capabilityLengthenedRootInterval = 1 << iota
|
|
capabilityCryptographicSetups
|
|
capabilitySetupACKs // nolint:deadcode,varcheck
|
|
capabilityDedupedCoordinateInfo
|
|
capabilitySoftState
|
|
capabilityHybridRouting
|
|
)
|
|
|
|
const ourVersion uint8 = 1
|
|
const ourCapabilities uint32 = capabilityLengthenedRootInterval | capabilityCryptographicSetups | capabilityDedupedCoordinateInfo | capabilitySoftState | capabilityHybridRouting
|