github.com/lbryio/lbcd@v0.22.119/claimtrie/param/general.go (about) 1 package param 2 3 import "github.com/lbryio/lbcd/wire" 4 5 type ClaimTrieParams struct { 6 MaxActiveDelay int32 7 ActiveDelayFactor int32 8 9 MaxNodeManagerCacheSize int 10 11 OriginalClaimExpirationTime int32 12 ExtendedClaimExpirationTime int32 13 ExtendedClaimExpirationForkHeight int32 14 15 MaxRemovalWorkaroundHeight int32 16 17 NormalizedNameForkHeight int32 18 AllClaimsInMerkleForkHeight int32 19 } 20 21 var ( 22 ActiveParams = MainNet 23 24 MainNet = ClaimTrieParams{ 25 MaxActiveDelay: 4032, 26 ActiveDelayFactor: 32, 27 MaxNodeManagerCacheSize: 32000, 28 29 OriginalClaimExpirationTime: 262974, 30 ExtendedClaimExpirationTime: 2102400, 31 ExtendedClaimExpirationForkHeight: 400155, // https://lbry.io/news/hf1807 32 MaxRemovalWorkaroundHeight: 658300, 33 NormalizedNameForkHeight: 539940, // targeting 21 March 2019}, https://lbry.com/news/hf1903 34 AllClaimsInMerkleForkHeight: 658309, // targeting 30 Oct 2019}, https://lbry.com/news/hf1910 35 } 36 37 TestNet = ClaimTrieParams{ 38 MaxActiveDelay: 4032, 39 ActiveDelayFactor: 32, 40 MaxNodeManagerCacheSize: 32000, 41 42 OriginalClaimExpirationTime: 262974, 43 ExtendedClaimExpirationTime: 2102400, 44 ExtendedClaimExpirationForkHeight: 278160, 45 MaxRemovalWorkaroundHeight: 1, // if you get a hash mismatch, come back to this 46 NormalizedNameForkHeight: 993380, 47 AllClaimsInMerkleForkHeight: 1198559, 48 } 49 50 Regtest = ClaimTrieParams{ 51 MaxActiveDelay: 4032, 52 ActiveDelayFactor: 32, 53 MaxNodeManagerCacheSize: 32000, 54 55 OriginalClaimExpirationTime: 500, 56 ExtendedClaimExpirationTime: 600, 57 ExtendedClaimExpirationForkHeight: 800, 58 MaxRemovalWorkaroundHeight: -1, 59 NormalizedNameForkHeight: 250, 60 AllClaimsInMerkleForkHeight: 349, 61 } 62 ) 63 64 func SetNetwork(net wire.BitcoinNet) { 65 66 switch net { 67 case wire.MainNet: 68 ActiveParams = MainNet 69 case wire.TestNet3: 70 ActiveParams = TestNet 71 case wire.TestNet, wire.SimNet: // "regtest" 72 ActiveParams = Regtest 73 } 74 }