multi: store peer flap rate on disk on best effort basis
Since we will use peer flap rate to determine how we rate limit, we store this value on disk per peer per channel. This allows us to restart with memory of our peers past behaviour, so we don't give badly behaving peers have a fresh start on restart. Last flap timestamp is stored with our flap count so that we can degrade this all time flap count over time for peers that have not recently flapped.
This commit is contained in:
9 files changed
+435
-19
No files matched your search
@@ -164,6 +164,12 @@ var (
|
||||
number: 17,
|
||||
migration: mig.CreateTLB(closeSummaryBucket),
|
||||
},
|
||||
{
|
||||
// Create a top level bucket which holds information
|
||||
// about our peers.
|
||||
number: 18,
|
||||
migration: mig.CreateTLB(peersBucket),
|
||||
},
|
||||
}
|
||||
|
||||
// Big endian is the preferred byte order, due to cursor scans over
|
||||
@@ -278,6 +284,7 @@ var topLevelBuckets = [][]byte{
|
||||
invoiceBucket,
|
||||
payAddrIndexBucket,
|
||||
paymentsIndexBucket,
|
||||
peersBucket,
|
||||
nodeInfoBucket,
|
||||
nodeBucket,
|
||||
edgeBucket,
|
||||
|
||||
Reference in new issue
Block a user