constants.go raw
1 package constant
2
3 import (
4 "github.com/p9c/p9/pkg/amt"
5 "github.com/p9c/p9/pkg/appdata"
6 "github.com/p9c/p9/pkg/blockchain"
7 "github.com/p9c/p9/pkg/peer"
8 "time"
9 )
10
11 // A lotta constants that probably aren't being used
12 const (
13 // defaultConfigFilename = "conf.json"
14 // defaultDataDirname = "node"
15
16 DefaultP2PPort = 11047
17 DefaultRPCListener = "127.0.0.1"
18 DefaultMaxPeers = 23
19 DefaultBanDuration = time.Hour * 24
20 DefaultBanThreshold = 100
21 DefaultMaxRPCClients = 10
22 DefaultMaxRPCWebsockets = 25
23 DefaultMaxRPCConcurrentReqs = 20
24 DefaultDbType = "ffldb"
25 DefaultFreeTxRelayLimit = 15.0
26 DefaultTrickleInterval = peer.DefaultTrickleInterval
27 DefaultBlockMaxSize = 200000
28 DefaultBlockMaxWeight = 3000000
29 BlockMaxSizeMin = 1000
30 BlockMaxSizeMax = blockchain.MaxBlockBaseSize - 1000
31 BlockMaxWeightMin = 4000
32 BlockMaxWeightMax = blockchain.MaxBlockWeight - 4000
33 DefaultMaxOrphanTransactions = 100
34 DefaultSigCacheMaxSize = 100000
35 // DefaultBlockPrioritySize is the default size in bytes for high - priority / low-fee transactions. It is used to
36 // help determine which are allowed into the mempool and consequently affects their relay and inclusion when
37 // generating block templates.
38 DefaultBlockPrioritySize = 50000
39 // DefaultMinRelayTxFee is the minimum fee in satoshi that is required for a
40 // transaction to be treated as free for relay and mining purposes. It is also
41 // used to help determine if a transaction is considered dust and as a base for
42 // calculating minimum required fees for larger transactions. This value is in
43 // Satoshi/1000 bytes.
44 DefaultMinRelayTxFee = amt.Amount(1000)
45 DefaultDataDirname = "wallet"
46 DefaultCAFilename = "wallet.cert"
47 DefaultConfigFilename = "conf.json"
48 DefaultLogLevel = "info"
49 DefaultLogDirname = ""
50 DefaultLogFilename = "wallet/log"
51 DefaultRPCMaxClients = 10
52 DefaultRPCMaxWebsockets = 25
53 WalletDbName = "wallet.db"
54 // DbName is
55 DbName = "wallet.db"
56 )
57
58 var DefaultHomeDir = appdata.Dir("pod", false)
59