mirror of
https://github.com/yzernik/squeaknode.git
synced 2026-08-18 13:09:08 +02:00
Add custom config for autoconnect peer interval (#1759)
This commit is contained in:
parent
7916ef1bee
commit
c6de020428
3 changed files with 5 additions and 1 deletions
|
|
@ -19,6 +19,7 @@ node.squeak_retention_s | int | [0,...] | yes | 604800 | SQUEAKNODE_NODE_SQUEAK_
|
|||
node.squeak_deletion_interval_s | int | [0,...] | yes | 10 | SQUEAKNODE_NODE_SQUEAK_DELETION_INTERVAL_S | The amount of time in seconds to wait in between deleting old squeaks.
|
||||
node.offer_deletion_interval_s | int | [0,...] | yes | 10 | SQUEAKNODE_NODE_OFFER_DELETION_INTERVAL_S | The amount of time in seconds to wait in between deleting old offers.
|
||||
node.interest_block_interval | int | [0,...] | yes | 2016 | SQUEAKNODE_NODE_INTEREST_BLOCK_INTERVAL | The number of blocks (starting from the most recent and descending) that this node will attempt to find squeaks with matching block height.
|
||||
node.peer_autoconnect_interval_s | int | [0,...] | yes | 10 | SQUEAKNODE_NODE_PEER_AUTOCONNECT_INTERVAL_S | The amount of time in seconds to wait in between trying to connect autoconnect peers.
|
||||
bitcoin.rpc_host | string | | yes | "localhost" | SQUEAKNODE_BITCOIN_RPC_HOST | The host of the bitcoin node to connect.
|
||||
bitcoin.rpc_port | int | | yes | 18334 | SQUEAKNODE_BITCOIN_RPC_HOST | The port of the bitcoin node to connect.
|
||||
bitcoin.rpc_user | string | | yes | "" | SQUEAKNODE_BITCOIN_RPC_USER | The username to use for authentication on the bitcoin node.
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ DEFAULT_INTEREST_BLOCK_INTERVAL = 2016
|
|||
DEFAULT_SENT_OFFER_RETENTION_S = 86400
|
||||
DEFAULT_RECEIVED_OFFER_RETENTION_S = 86400
|
||||
DEFAULT_OFFER_DELETION_INTERVAL_S = 10
|
||||
DEFAULT_PEER_AUTOCONNECT_INTERVAL_S = 10
|
||||
DEFAULT_SUBSCRIBE_INVOICES_RETRY_S = 10
|
||||
DEFAULT_SQUEAK_RETENTION_S = 604800
|
||||
DEFAULT_SQUEAK_DELETION_INTERVAL_S = 10
|
||||
|
|
@ -151,6 +152,8 @@ class NodeConfig(Config):
|
|||
cast=int, required=False, default=DEFAULT_OFFER_DELETION_INTERVAL_S)
|
||||
interest_block_interval = key(
|
||||
cast=int, required=False, default=DEFAULT_INTEREST_BLOCK_INTERVAL)
|
||||
peer_autoconnect_interval_s = key(
|
||||
cast=int, required=False, default=DEFAULT_PEER_AUTOCONNECT_INTERVAL_S)
|
||||
|
||||
|
||||
@section('db')
|
||||
|
|
|
|||
|
|
@ -229,7 +229,7 @@ class SqueakNode:
|
|||
def initialize_peer_connection_worker(self):
|
||||
self.peer_connection_worker = PeerConnectionWorker(
|
||||
self.squeak_controller,
|
||||
10,
|
||||
self.config.node.peer_autoconnect_interval_s,
|
||||
)
|
||||
|
||||
def initialize_squeak_deletion_worker(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue