@@ -3725,22 +3725,35 @@ class Program {
37253725 chainstate_txt_hash_output_path = chainstate_txt_output_path + '.sha256'
37263726 chainstate_f = open (chainstate_txt_output_path , 'w' )
37273727
3728+ # namespace patches
3729+ namespace_patches = {
3730+ 'btc' : {
3731+ 'buckets' : '1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1' , # originally: 3;3;3;3;3;3;3;3;3;3;3;3;3;3;3;3
3732+ 'base' : '1000' , # originally: 100
3733+ 'coeff' : '200' , # originally: 2
3734+ 'nonalpha_discount' : '1' ,
3735+ 'no_vowel_discount' : '1' ,
3736+ }
3737+ }
37283738 print_status ("Querying namespace IDs..." )
37293739 namespaces_entries = db .get_all_namespace_ids ()
37303740 namespaces_entries .sort ()
37313741 chainstate_f .write ('-----BEGIN NAMESPACES-----\n ' )
37323742 chainstate_f .write ('namespace_id,address,buckets,base,coeff,nonalpha_discount,no_vowel_discount,lifetime\n ' )
37333743 for namespace_str in namespaces_entries :
37343744 namespace_info = db .get_namespace (namespace_str )
3745+ namespace_id = namespace_info ['namespace_id' ]
37353746 namespace = {}
3736- namespace ['namespace_id' ] = namespace_info [ ' namespace_id' ]
3747+ namespace ['namespace_id' ] = namespace_id
37373748 namespace ['address' ] = b58ToC32 (str (namespace_info ['address' ]))
37383749 namespace ['buckets' ] = ';' .join (str (x ) for x in namespace_info ['buckets' ])
37393750 namespace ['base' ] = namespace_info ['base' ]
37403751 namespace ['coeff' ] = namespace_info ['coeff' ]
37413752 namespace ['nonalpha_discount' ] = namespace_info ['nonalpha_discount' ]
37423753 namespace ['no_vowel_discount' ] = namespace_info ['no_vowel_discount' ]
37433754 namespace ['lifetime' ] = 0 if namespace_info ['lifetime' ] == NAMESPACE_LIFE_INFINITE else namespace_info ['lifetime' ]
3755+ if namespace_id in namespace_patches :
3756+ namespace .update (namespace_patches [namespace_id ])
37443757 chainstate_f .write ('{},{},{},{},{},{},{},{}\n ' .format (
37453758 namespace ['namespace_id' ], namespace ['address' ],
37463759 namespace ['buckets' ], namespace ['base' ], namespace ['coeff' ], namespace ['nonalpha_discount' ],
0 commit comments