forked from zack-bitcoin/basiccoin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcustom.py
More file actions
36 lines (36 loc) · 1.03 KB
/
custom.py
File metadata and controls
36 lines (36 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import tools, hashlib
#This is for easy customization of new currencies.
def hash_(x): return hashlib.sha256(x).hexdigest()
database_name='DB.db'
listen_port=8900
gui_port=8700
version="VERSION"
block_reward=10**5
premine=5*10**6
fee=10**3
mmm=100#lower limits on what
#the "time" tag in a block can say. Take the median
#of this many of the blocks.
history_length=400#how far back in history do
#we look when we use statistics to guess at
#the current blocktime and difficulty.
inflection=0.985#This constant is selected such
#that the 50 most recent blocks count for 1/2 the
#total weight.
download_many=500#max number of blocks to request
#from a peer at the same time.
max_download=50000
brainwallet='brain wallet'
privkey=tools.det_hash(brainwallet)
pubkey=tools.privtopub(privkey)
peers=[['localhost', 8901],
['localhost', 8902],
['localhost', 8903],
['localhost', 8904],
['localhost', 8905]]
hashes_per_check=10**5
def blocktime(length):
if length*block_reward<premine:
return 30
else:
return 60