forked from JeremyRubin/tinycoin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbase.py
37 lines (25 loc) · 791 Bytes
/
base.py
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
37
from ecdsa import SigningKey, VerifyingKey
import hashlib
import sys
import ast
import random
import tornado
import tornado.websocket
from tornado.queues import Queue
from tornado import gen
from tornado.ioloop import IOLoop
import datetime
def sha(x):
return hashlib.sha256(x).hexdigest()
BOUND = 0b111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111
print BOUND
PORT_DEF = 8001
PORT = 8000
ALREADY_PEERED = 0
BLOCK_REWARD = 25e8
def example(name, condition):
print name
assert condition
def pow(string, b):
print string, b
return int(string, 16) < b