Created
November 16, 2014 15:00
-
-
Save bitzeny/21cc646464f4314c9354 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/Abe/Chain.py b/Abe/Chain.py | |
index 6f72ea3..d071a5e 100644 | |
--- a/Abe/Chain.py | |
+++ b/Abe/Chain.py | |
@@ -32,6 +32,7 @@ def create(policy, **kwargs): | |
if policy == "Bitleu": return Bitleu(**kwargs) | |
if policy == "Keccak": return KeccakChain(**kwargs) | |
if policy == "Maxcoin": return Maxcoin(**kwargs) | |
+ if policy == "Kumacoin": return Kumacoin(**kwargs) | |
return Sha256NmcAuxPowChain(**kwargs) | |
@@ -415,3 +416,30 @@ class Maxcoin(KeccakChain): | |
datadir_conf_file_name = 'maxcoin.conf' | |
datadir_rpcport = 8669 | |
+ | |
+class QuarkChain(Chain): | |
+ def block_header_hash(chain, header): | |
+ import quark_hash | |
+ return quark_hash.getPoWHash(header) | |
+ | |
+class Kumacoin(QuarkChain): | |
+ def has_feature(chain, feature): | |
+ return feature == 'nvc_proof_of_stake' | |
+ | |
+ def ds_parse_transaction(chain, ds): | |
+ return deserialize.parse_Transaction(ds, has_nTime=True) | |
+ | |
+ def __init__(chain, **kwargs): | |
+ chain.name = 'Kumacoin' | |
+ chain.code3 = 'KUMA' | |
+ chain.address_version = '\x2d' #PUBKEY_ADDRESS | |
+ chain.script_addr_vers = '\x08' #SCRIPT_ADDRESS | |
+ chain.magic = "\xc3\xd4\xd2\xfe" | |
+ chain.decimals = 6 | |
+ Chain.__init__(chain, **kwargs) | |
+ | |
+ datadir_conf_file_name = 'kumacoin.conf' | |
+ datadir_rpcport = 7585 | |
+ | |
+ | |
+ | |
diff --git a/Abe/DataStore.py b/Abe/DataStore.py | |
index bb1d091..0dddc3f 100644 | |
--- a/Abe/DataStore.py | |
+++ b/Abe/DataStore.py | |
@@ -1721,7 +1721,8 @@ store._ddl['txout_approx'], | |
'version': block_version, | |
} | |
- is_stake_chain = chain is not None and chain.has_feature('nvc_proof_of_stake') | |
+ #is_stake_chain = chain is not None and chain.has_feature('nvc_proof_of_stake') | |
+ is_stake_chain = True | |
if is_stake_chain: | |
# Proof-of-stake display based loosely on CryptoManiac/novacoin and | |
# http://nvc.cryptocoinexplorer.com. | |
diff --git a/Abe/abe.py b/Abe/abe.py | |
index 37c8c75..bbca97c 100755 | |
--- a/Abe/abe.py | |
+++ b/Abe/abe.py | |
@@ -561,7 +561,7 @@ class Abe: | |
body += abe.short_link(page, 'b/' + block_shortlink(b['hash'])) | |
is_stake_chain = chain.has_feature('nvc_proof_of_stake') | |
- is_stake_block = is_stake_chain and b['is_proof_of_stake'] | |
+ is_stake_block = is_stake_chain and b.has_key('is_proof_of_stake') and b['is_proof_of_stake'] | |
body += ['<p>'] | |
if is_stake_chain: | |
diff --git a/abe.conf b/abe.conf | |
index e7bb6b9..3cca207 100644 | |
--- a/abe.conf | |
+++ b/abe.conf | |
@@ -30,8 +30,8 @@ | |
#connect-args = { "database": "abe" } | |
# MySQL example; see also README-MYSQL.txt: | |
-#dbtype MySQLdb | |
-#connect-args {"user":"root","db":"abe"} | |
+dbtype MySQLdb | |
+connect-args {"user":"user_name","db":"db_name", "passwd":"password"} | |
# SQLite3 example: | |
#dbtype = sqlite3 | |
@@ -55,8 +55,8 @@ | |
#connect-args {"dsn":"DATABASE=abe;UID=db2inst1;PWD=B!tCo1N","conn_options":{"102":0}} | |
# Specify port and/or host to serve HTTP instead of FastCGI: | |
-#port 2750 | |
-#host localhost | |
+port 3000 | |
+host web_url | |
# Specify no-serve to exit immediately after importing block files: | |
#no-serve | |
@@ -106,13 +106,16 @@ | |
#datadir += /home/bitcoin/.bitcoin/testnet | |
#datadir += /home/bitcoin/.namecoin | |
#datadir += /home/bitcoin/.novacoin | |
+#datadir += /home/user_name/.Kumacoin | |
# datadir | |
-#datadir += [{ | |
-# "dirname": "/home/bitcoin/.bitcoin", | |
-# "loader": "rpc", # See the comments for default-loader below. | |
-# "chain": "Bitcoin" | |
-# }] | |
+datadir += [{ | |
+ "dirname": "/home/user_name/.Kumacoin", | |
+ "loader": "rpc,blkfile", # See the comments for default-loader below. | |
+ "decimals": 6, | |
+ "chain": "Kumacoin", | |
+ "address_version": "\u002d" | |
+ }] | |
#datadir += [{ | |
# "dirname": "/home/jtobey/.novacoin", | |
# "chain": "NewCoin", # Display as "NewCoin" ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment